CustomDrawElement Class
Represents a System.Windows.UIElement that is capable of being custom drawn via the handling of its CustomDraw event.
public class CustomDrawElement : FrameworkElement, DUCE.IResource, IAnimatable, IFrameworkInputElement, IInputElement, ISupportInitialize, IHaveResources, IQueryAmbient
- Inheritance:
- System.Object System.Windows.Threading.DispatcherObject System.Windows.DependencyObject System.Windows.Media.Visual System.Windows.UIElement System.Windows.FrameworkElement Object
Remarks
For detailed documentation on this control's features and how to use them, please see the CustomDrawElement documentation topic.
Constructors
CustomDrawElement()
public CustomDrawElement()
Methods
GetLayoutClip(Size)
Returns a geometry for a clipping mask.
protected override Geometry GetLayoutClip(Size layoutSlotSize)
Parameter | Type | Description |
---|---|---|
layoutSlotSize | System.Windows.Size | The layout slot size. |
Returns
- System.Windows.Media.Geometry:
The clipping mask geometry.
OnCustomDraw(DrawingContext)
Raises the CustomDraw event.
protected virtual void OnCustomDraw(DrawingContext drawingContext)
Parameter | Type | Description |
---|---|---|
drawingContext | System.Windows.Media.DrawingContext | The System.Windows.Media.DrawingContext to use. |
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 | System.Windows.Media.DrawingContext | The drawing instructions for a specific element. This context is provided to the layout system. |
Events
CustomDraw
Occurs when the element requests to be custom drawn.
public event EventHandler<CustomDrawElementCustomDrawEventArgs> CustomDraw
Event Type
- System.EventHandler<CustomDrawElementCustomDrawEventArgs>
Fields
CustomDrawEvent
Identifies the CustomDraw routed event. This field is read-only.
public static readonly RoutedEvent CustomDrawEvent
Inherited Members
- System.Object.ToString()
- System.Object.Equals(System.Object)
- System.Object.Equals(System.Object, System.Object)
- System.Object.ReferenceEquals(System.Object, System.Object)
- System.Object.GetHashCode()
- System.Object.GetType()
- System.Object.MemberwiseClone()
Extension Methods
- FrameworkElementExtensions.AnimateDoubleProperty(String, Double, Double, Double, Nullable<Double>, Nullable<Double>)
- FrameworkElementExtensions.BindToProperty(DependencyProperty, Object, String, BindingMode, IValueConverter, Object)
- FrameworkElementExtensions.BindToProperty(DependencyProperty, Object, DependencyProperty, BindingMode, IValueConverter, Object)
- FrameworkElementExtensions.GetCurrentSize()