May 11, 2014
Gets or sets the degree of opacity of a Brush.
Assembly: System.Windows (in System.Windows.dll)
XMLNS for XAML: Not mapped to an xmlns.
Dependency property identifier field: OpacityProperty
An Opacity value of 0 indicates that the brush is completely transparent, while a value of 1 indicates that the brush is completely opaque. A value of 0.5 indicates the brush is 50% opaque, a value of 0.725 indicates the brush is 72.5% opaque, and so on. Values less than 0 are treated as 0, while values greater than 1 are treated as 1.
The following illustrations shows a red rectangle with several different Opacity values.
An Opacity of 0 applied to any Brush is still hit testable. Only a true null Brush is not hit testable. You could however set IsHitTestVisible to false to remove any hit testing against the UIElement where the Brush is ultimately applied.