Export (0) Print
Expand All

DropShadowEffect.Opacity Property

Gets or sets the degree of opacity of the shadow.

Namespace:  System.Windows.Media.Effects
Assembly:  System.Windows (in System.Windows.dll)

'Declaration
Public Property Opacity As Double
<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.

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.

Shows fully opaque drop shadow.Semi-transparent Drop Shadow.

Silverlight

Supported in: 5, 4, 3

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

ADD
Show:
© 2014 Microsoft