Partager via


DropShadowEffect.Color Property

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Gets or sets the color of the shadow.

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

Syntax

'Declaration
Public Property Color As Color
public Color Color { get; set; }
<DropShadowEffect Color="colorString"/>

XAML Values

  • colorString
    A Color expressed as an attribute string. This can be a named color or an RGB value. See Color. As noted in Remarks, alpha information is permitted but is ignored.

Property Value

Type: System.Windows.Media.Color
The color of the shadow. The default is a color with ARGB value of FF000000 (black).

Remarks

Dependency property identifier field: ColorProperty

The alpha value of the Color structure is ignored by this property. To set the amount of transparency (alpha) of the color, use the Opacity property.

The following illustrations demonstrate the effect of this property.

Button casting black drop shadow.Button casting a yellow drop shadow.

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.