DropShadowEffect.Opacity Property
Microsoft Silverlight will reach end of support after October 2021. Learn more.
Gets or sets the degree of opacity of the shadow.
Namespace: System.Windows.Media.Effects
Assembly: System.Windows (in System.Windows.dll)
Syntax
'Declaration
Public Property Opacity As Double
public double Opacity { get; set; }
<DropShadowEffect Opacity="double"/>
Property Value
Type: System.Double
The degree of opacity. The valid range of values is from 0 through 1, where 0 is completely transparent and 1 is completely opaque. The default is 1.
Remarks
Dependency property identifier field: OpacityProperty
A value of 0 indicates that the shadow is completely transparent, and a value of 1 indicates that the shadow is completely opaque. A value of 0.5 indicates the shadow is 50 percent opaque, a value of 0.725 indicates the shadow is 72.5 percent opaque, and so on. Values less than 0 are treated as 0, and values greater than 1 are treated as 1.
This property must be used to set the opacity of the DropShadowEffect because the alpha level component of the DropShadowEffect.Color property is ignored.
The following illustrations demonstrate the effect of this property.
Version Information
Silverlight
Supported in: 5, 4, 3
Platforms
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.