UIElement
Provides diagram elements with text, transforms, clipping, painting hooks, and mouse and focus events.
Definition
Namespace:Telerik.WinControls.UI.Diagrams
Assembly:Telerik.WinControls.RadDiagram.dll
Syntax:
public abstract class UIElement : VisualElement, IDisposable, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IStylableNode
Inheritance: objectDisposableObjectRadObjectRadElementVisualElementUIElement...
Derived Classes:
Implements:
Inherited Members
Constructors
Creates an element that paints itself, does not apply a theme, and notifies its parent of mouse input.
public UIElement()
Fields
Identifies the clipping geometry property, whose registered default is null.
public static RadProperty ClipProperty
Reserved compatibility field; this implementation does not register it and leaves it null.
public static RadProperty FlowDirectionProperty
Identifies the text property, whose registered default is an empty string.
public static RadProperty TextProperty
Properties
Gets or sets an automation identifier assigned to this element by diagram infrastructure.
[Browsable(false)]
public string AutomationID { get; set; }
Gets or sets the geometry used to clip this element. Setting a non-null value enables the element's clip-drawing behavior.
[Browsable(false)]
public Geometry Clip { get; set; }
Gets or sets a caller-maintained marker indicating whether the element has received focus; the base class does not update it automatically.
public bool HasReceivedFocus { get; set; }
This property is used internally!
public override bool IsFocusable { get; set; }
Overrides:
Gets or sets a transform. Changes are applied to the element's native scale, angle, or position settings when the transform is a matching transform type.
[Browsable(false)]
public Transform RenderTransform { get; set; }
Methods
Determines whether this element should be painted; the base implementation checks that its visibility is Visible.
protected virtual bool CanPaint(IPaintingContext context)
The context that will be used for painting.
Returns:true when the element is visible.
Captures mouse input to this element by setting its capture state.
public void CaptureMouse()
Clears the local value for a registered property so the element uses that property's default or inherited value.
public void ClearValue(RadProperty property)
The property whose local value is cleared.
Creates the child elements and initializes a transform group with the element's default transforms.
protected override void CreateChildElements()
Overrides:
Raises click notifications on this element and, while enabled and unhandled, its ancestor UI elements.
protected override void DoClick(EventArgs e)
The click event data; mouse-button data controls handled-state propagation.
Overrides:
Raises double-click notifications on this element and, while enabled and unhandled, its ancestor UI elements.
protected override void DoDoubleClick(EventArgs e)
The double-click event data; mouse-button data controls handled-state propagation.
Overrides:
Raises the mouse-move event when this element can respond to mouse input, then notifies eligible ancestors.
protected override void DoMouseMove(MouseEventArgs e)
The mouse-move event data.
Overrides:
Raises the mouse-wheel event and notifies ancestor UI elements while parent notification is enabled and the event remains unhandled.
protected override void DoMouseWheel(MouseEventArgs e)
The mouse-wheel event data.
Overrides:
Calculates the client clip rectangle after border and padding insets, intersecting it with Clip only when the clip is a RectangleGeometry.
protected override RectangleF GetClipRect()
The resulting client clip rectangle.
Overrides:
Tests the point against the element's shape or transformed bounds. This method does not consult IsHitTestVisible.
Invalidates the parent's measure after the element's bounds change when automatic sizing is disabled.
protected override void OnBoundsChanged(RadPropertyChangedEventArgs e)
The bounds change data.
Overrides:
Raises CLR mouse events for unhandled routed mouse input and cancels further routing when a handler marks it handled.
protected override void OnBubbleEvent(RadElement sender, RoutedEventArgs args)
The element that raised the routed event.
argsRoutedEventArgsThe routed event data.
Overrides:
Performs base click handling and raises MouseClick when the event data contains mouse-button information.
protected override void OnClick(EventArgs e)
The click event data.
Overrides:
Performs base double-click handling and raises MouseDoubleClick when the event data contains mouse-button information.
protected override void OnDoubleClick(EventArgs e)
The double-click event data.
Overrides:
Raises MouseClick. Override this method to customize click handling; call the base implementation to notify event subscribers.
protected virtual void OnMouseClick(MouseButtonEventArgs e)
The mouse-button event data.
Raises MouseDoubleClick. Override this method to customize double-click handling; call the base implementation to notify event subscribers.
protected virtual void OnMouseDoubleClick(MouseButtonEventArgs e)
The mouse-button event data.
Dispatches left- or right-button press events and focuses the element when the input is not already handled.
protected override void OnMouseDown(MouseEventArgs e)
The mouse event data.
Overrides:
Raises MouseLeftButtonDown. Override this method to customize press handling; call the base implementation to notify event subscribers.
protected virtual void OnMouseLeftButtonDown(MouseButtonEventArgs e)
The mouse-button event data.
Raises MouseLeftButtonUp. Override this method to customize release handling; call the base implementation to notify event subscribers.
protected virtual void OnMouseLeftButtonUp(MouseButtonEventArgs e)
The mouse-button event data.
Raises MouseRightButtonDown. Override this method to customize press handling; call the base implementation to notify event subscribers.
protected virtual void OnMouseRightButtonDown(MouseButtonEventArgs e)
The mouse-button event data.
Raises MouseRightButtonUp. Override this method to customize release handling; call the base implementation to notify event subscribers.
protected virtual void OnMouseRightButtonUp(MouseButtonEventArgs e)
The mouse-button event data.
Dispatches left- or right-button release events when the input is not already handled.
protected override void OnMouseUp(MouseEventArgs e)
The mouse event data.
Overrides:
Raises the corresponding focus event when the element's focused state changes.
protected override void OnPropertyChanged(RadPropertyChangedEventArgs e)
The changed property and its old and new values.
Overrides:
Paints this element only when CanPaint(IPaintingContext) returns true.
public void Paint(IPaintingContext context)
The context used to draw the element.
Provides the content-painting hook called after CanPaint(IPaintingContext) succeeds.
protected virtual void PaintCore(IPaintingContext context)
The context used to draw the element.
Releases mouse capture from this element.
public void ReleaseMouseCapture()
Applies a supported ScaleTransform, RotateTransform, or TranslateTransform to the corresponding element transform settings; other transform types reset those settings.
public void UpdateRenderTransform()
Events
Occurs when the element's focused state becomes true.
public event EventHandler GotFocus
Occurs when the element's focused state becomes false.
public event EventHandler LostFocus
Occurs when a click is processed for this element.
public event EventHandler<MouseButtonEventArgs> MouseClick
Click notifications can also be sent to ancestor UIElement instances while parent notification is enabled and the event remains unhandled.
Occurs when a double-click is processed for this element.
public event EventHandler<MouseButtonEventArgs> MouseDoubleClick
Double-click notifications can also be sent to ancestor UIElement instances while parent notification is enabled and the event remains unhandled.
Occurs when this element receives a left-button press. Handlers can mark the event arguments as handled to stop further routed processing.
public event EventHandler<MouseButtonEventArgs> MouseLeftButtonDown
Occurs when this element receives a left-button release.
public event EventHandler<MouseButtonEventArgs> MouseLeftButtonUp
Occurs when this element receives a right-button press. Handlers can mark the event arguments as handled to stop further routed processing.
public event EventHandler<MouseButtonEventArgs> MouseRightButtonDown
Occurs when this element receives a right-button release.
public event EventHandler<MouseButtonEventArgs> MouseRightButtonUp