DropShadowChrome Class
Renders a drop shadow effect.
public class DropShadowChrome : Decorator
- Inheritance:
- object Visual UIElement FrameworkElement Decorator object
Remarks
For detailed documentation on this control's features and how to use them, please see the DropShadowChrome documentation topic.
Constructors
DropShadowChrome()
Initializes an instance of the class.
public DropShadowChrome()
Properties
BorderThickness
Gets or sets the Thickness of the drop shadow borders.
public Thickness BorderThickness { get; set; }
Property Value
Color
Gets or sets the color of the drop shadow.
public Color Color { get; set; }
Property Value
- Color:
The color of the drop shadow. The default value is
#71000000
.
CornerRadius
Gets or sets the CornerRadius of the drop shadow borders.
public CornerRadius CornerRadius { get; set; }
Property Value
- CornerRadius:
The CornerRadius of the drop shadow borders. 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
Gets or sets the horizontal offset of the drop shadow behind its content.
public double XOffset { get; set; }
Property Value
- double:
The horizontal offset of the drop shadow behind its content. The default value is
5
.
YOffset
Gets or sets the vertical offset of the drop shadow behind its content.
public double YOffset { get; set; }
Property Value
- double:
The vertical offset of the drop shadow behind its content. The default value is
5
.
ZOffset
Gets or sets the z-offset of the drop shadow behind its content.
public double ZOffset { get; set; }
Property Value
- double:
The z-offset of the drop shadow behind its content. 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
Identifies the BorderThickness dependency property. This field is read-only.
public static readonly DependencyProperty BorderThicknessProperty
ColorProperty
Identifies the Color dependency property. This field is read-only.
public static readonly DependencyProperty ColorProperty
CornerRadiusProperty
Identifies the CornerRadius dependency property. This field is read-only.
public static readonly DependencyProperty CornerRadiusProperty
XOffsetProperty
Identifies the XOffset dependency property. This field is read-only.
public static readonly DependencyProperty XOffsetProperty
YOffsetProperty
Identifies the YOffset dependency property. This field is read-only.
public static readonly DependencyProperty YOffsetProperty
ZOffsetProperty
Identifies the ZOffset dependency property. This field is read-only.
public static readonly DependencyProperty ZOffsetProperty