In This Article

DropShadowChrome Class

Renders a drop shadow effect.

public class DropShadowChrome : Decorator
Inheritance:
object Visual UIElement FrameworkElement Decorator object

Constructors

DropShadowChrome()

Initializes an instance of the class.

public DropShadowChrome()

Properties

BorderThickness

The Thickness of the drop shadow borders.

public Thickness BorderThickness { get; set; }

Property Value

Thickness:

The default value is 5.

Color

The color of the drop shadow.

public Color Color { get; set; }

Property Value

Color:

The default value is #71000000.

CornerRadius

The CornerRadius of the drop shadow borders.

public CornerRadius CornerRadius { get; set; }

Property Value

CornerRadius:

The default value is 0.

Remarks

When setting a non-zero corner radius, please use a uniform value and also use a uniform BorderThickness value as well.

XOffset

The horizontal offset of the drop shadow behind its content.

public double XOffset { get; set; }

Property Value

double:

The default value is 5.

YOffset

The vertical offset of the drop shadow behind its content.

public double YOffset { get; set; }

Property Value

double:

The default value is 5.

ZOffset

The z-offset of the drop shadow behind its content.

public double ZOffset { get; set; }

Property Value

double:

The default value is 0.

Methods

OnRender(DrawingContext)

When overridden in a derived class, participates in rendering operations that are directed by the layout system. The rendering instructions for this element are not used directly when this method is invoked, and are instead preserved for later asynchronous use by layout and drawing.

protected override void OnRender(DrawingContext drawingContext)
Parameter Type Description
drawingContext DrawingContext

The drawing instructions for a specific element. This context is provided to the layout system.

Fields

BorderThicknessProperty

Defines the BorderThickness property.

public static readonly DependencyProperty BorderThicknessProperty

ColorProperty

Defines the Color property.

public static readonly DependencyProperty ColorProperty

CornerRadiusProperty

Defines the CornerRadius property.

public static readonly DependencyProperty CornerRadiusProperty

XOffsetProperty

Defines the XOffset property.

public static readonly DependencyProperty XOffsetProperty

YOffsetProperty

Defines the YOffset property.

public static readonly DependencyProperty YOffsetProperty

ZOffsetProperty

Defines the ZOffset property.

public static readonly DependencyProperty ZOffsetProperty

Extension Methods