Export (0) Print
Expand All
Key
M11
M12
M21
M22
Tag
Uri
X1
X2
Y1
Y2
Expand Minimize
1 out of 1 rated this helpful - Rate this topic

Opacity (Brush)

Silverlight

Gets or sets the degree of opacity of a Brush.

<object Opacity="Double"  .../>
value = object.Opacity
object.Opacity = value

Type: Double

The value of the Opacity property, expressed as a value between 0 and 1.0.

This property is read/write. The default value is 1.0.

An Opacity value of 0 indicates that the brush is completely transparent, and a value of 1 indicates that the brush is completely opaque. A value of 0.5 indicates that the brush is 50% opaque, a value of 0.725 indicates that the brush is 72.5% opaque, and so on. Values that are less than 0 are treated as 0, and values that are greater than 1 are treated as 1.

An Opacity of 0 applied to any Brush is still hit-tested. Only a true null Brush is not hit-tested. You could, however, set the IsHitTestVisible property to false to remove any hit-testing against the UIElement where the Brush is ultimately applied.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.