Opacity Property (Brush)
Gets or sets the degree of opacity of a Brush.
XAML |
<object Opacity="Double" .../>
|
Scripting |
value = object.Opacity object.Opacity = value |
Property Value
The value of the Opacity property is expressed as a value between 0 and 1.0.
This property is read/write. The default value is 1.0.
Remarks
A 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.
Opacity = 1
Opacity = 0.7
Opacity = 0.5
Opacity = 0.2
Opacity = 0
Applies To
ImageBrush, LinearGradientBrush, RadialGradientBrush, SolidColorBrush, VideoBrush