UIElement
Provides shared text, transform, clipping, painting, focus, and mouse-routing behavior for RichTextEditor UI elements.
Definition
Namespace:Telerik.WinControls.RichTextEditor.UI
Assembly:Telerik.WinControls.RichTextEditor.dll
Syntax:
public abstract class UIElement : VisualElement, IDisposable, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IStylableNode
Inheritance: objectDisposableObjectRadObjectRadElementVisualElementUIElement...
Derived Classes:
Implements:
Inherited Members
Constructors
Initializes an element that paints itself and notifies parent UI elements about mouse input.
public UIElement()
Fields
Reserved for flow-direction metadata; this class does not register or initialize the field.
public static RadProperty FlowDirectionProperty
Identifies the text value stored by a UIElement; its registered default is an empty string.
public static RadProperty TextProperty
Properties
Gets or sets the automation identifier assigned to this element by RichTextEditor accessibility helpers.
public string AutomationID { get; set; }
Gets or sets the geometry used to clip this element. A non-null value enables the element's clip drawing.
public Geometry Clip { get; set; }
Gets the dispatcher of the containing RadRichTextEditor, or null when the element is not attached to one.
public Dispatcher Dispatcher { get; }
Gets or sets whether this element has previously received focus; focus-sensitive UI providers use this alongside current focus state.
public bool HasReceivedFocus { get; set; }
This property is used internally!
public override bool IsFocusable { get; set; }
Overrides:
Gets or sets the transform applied to the element. Scale, rotation, and translation transforms map to the corresponding Telerik element transforms. Switching between supported transform types does not clear previously applied transforms; an unsupported or missing transform resets them. Changes to the assigned transform's properties are not applied automatically; call UpdateRenderTransform() to apply them.
public RenderTransform RenderTransform { get; set; }
Methods
Determines whether Paint(IPaintingContext) should invoke PaintCore(IPaintingContext). The default implementation permits painting only when the element is visible.
protected virtual bool CanPaint(IPaintingContext context)
The drawing context for the pending paint operation.
Returns:Captures mouse input for this element.
public void CaptureMouse()
Resets a Telerik property to its registered default value.
public void ClearValue(RadProperty property)
The property to reset.
Raises the click event on this element and, when enabled and unhandled, on its parent UI elements.
protected override void DoClick(EventArgs e)
The event data; only MouseButtonEventArgs input is processed.
Overrides:
Raises the double-click event on this element and, when enabled and unhandled, on its parent UI elements.
protected override void DoDoubleClick(EventArgs e)
The event data; only MouseButtonEventArgs input is processed.
Overrides:
Raises mouse-move input on this element and routes mouse-button event data to parent UI elements while it remains unhandled.
protected override void DoMouseMove(MouseEventArgs e)
The mouse-move input and, when available, its routing state.
Overrides:
Raises the mouse-wheel input on this element and routes it to parent UI elements until it is handled or routing is disabled.
protected override void DoMouseWheel(MouseEventArgs e)
The mouse-wheel input and its routing state.
Overrides:
Gets the content rectangle after applying border thickness, padding, and a rectangular Clip geometry.
protected override RectangleF GetClipRect()
The rectangle available for content, intersected with Clip when it is a RectangleGeometry.
Overrides:
Tests whether a point intersects this element's shape or transformed bounds.
Disables theme application for this element after initializing the inherited Telerik element fields.
protected override void InitializeFields()
Overrides:
Invalidates the parent's measurement when this element's bounds change while it is not auto-sized.
protected override void OnBoundsChanged(RadPropertyChangedEventArgs e)
The bounds property change data.
Overrides:
Dispatches unhandled routed mouse input to this element's CLR events and cancels further Telerik routing when it is handled.
protected override void OnBubbleEvent(RadElement sender, RoutedEventArgs args)
The element that raised the routed event.
argsRoutedEventArgsThe routed event data.
Overrides:
Raises MouseClick after the inherited click handler processes mouse-button input.
protected override void OnClick(EventArgs e)
The click event data.
Overrides:
Raises MouseDoubleClick after the inherited double-click handler processes mouse-button input.
protected override void OnDoubleClick(EventArgs e)
The double-click event data.
Overrides:
Raises MouseClick for the supplied mouse input.
protected virtual void OnMouseClick(MouseButtonEventArgs e)
The mouse-button input and its routing state.
Raises MouseDoubleClick for the supplied mouse input.
protected virtual void OnMouseDoubleClick(MouseButtonEventArgs e)
The mouse-button input and its routing state.
Processes mouse-button presses, raises the corresponding left- or right-button event, and focuses the element.
protected override void OnMouseDown(MouseEventArgs e)
The mouse input; already-handled button input is ignored.
Overrides:
Raises MouseLeftButtonDown for the supplied mouse input.
protected virtual void OnMouseLeftButtonDown(MouseButtonEventArgs e)
The mouse-button input and its routing state.
Raises MouseLeftButtonUp for the supplied mouse input.
protected virtual void OnMouseLeftButtonUp(MouseButtonEventArgs e)
The mouse-button input and its routing state.
Raises MouseRightButtonDown for the supplied mouse input.
protected virtual void OnMouseRightButtonDown(MouseButtonEventArgs e)
The mouse-button input and its routing state.
Raises MouseRightButtonUp for the supplied mouse input.
protected virtual void OnMouseRightButtonUp(MouseButtonEventArgs e)
The mouse-button input and its routing state.
Processes mouse-button releases and raises the corresponding left- or right-button event unless the input is handled.
protected override void OnMouseUp(MouseEventArgs e)
The mouse input and its routing state.
Overrides:
Raises the corresponding focus notification when the element's focused state changes.
protected override void OnPropertyChanged(RadPropertyChangedEventArgs e)
The property change data.
Overrides:
Paints the element when CanPaint(IPaintingContext) permits it, using PaintCore(IPaintingContext).
public void Paint(IPaintingContext context)
The drawing context supplied by the RichTextEditor rendering pipeline.
Provides the drawing hook called by Paint(IPaintingContext) when CanPaint(IPaintingContext) returns true.
protected virtual void PaintCore(IPaintingContext context)
The drawing context for this paint operation.
Releases mouse capture from this element.
public void ReleaseMouseCapture()
Applies the current RenderTransform to the Telerik element transforms. Unsupported or missing transforms reset the scale, position offset, and angle. A supported transform updates only its corresponding Telerik transform.
public void UpdateRenderTransform()
Events
Occurs when the element's Telerik focused state becomes true.
public event EventHandler GotFocus
Occurs when the element's Telerik focused state becomes false.
public event EventHandler LostFocus
Occurs for a mouse click routed to this element; unhandled clicks can continue to parent UI elements.
public event EventHandler<MouseButtonEventArgs> MouseClick
Occurs for a mouse double-click routed to this element; unhandled clicks can continue to parent UI elements.
public event EventHandler<MouseButtonEventArgs> MouseDoubleClick
Declares a mouse-enter event for compatibility; this UIElement implementation does not raise it.
public event EventHandler<MouseButtonEventArgs> MouseEnter
Occurs when a left-button press is routed to this element. Marking the event arguments handled prevents further mouse routing.
public event EventHandler<MouseButtonEventArgs> MouseLeftButtonDown
Occurs when a left-button release is routed to this element. Marking the event arguments handled prevents further mouse routing.
public event EventHandler<MouseButtonEventArgs> MouseLeftButtonUp
Occurs when a right-button press is routed to this element. Marking the event arguments handled prevents further mouse routing.
public event EventHandler<MouseButtonEventArgs> MouseRightButtonDown
Occurs when a right-button release is routed to this element. Marking the event arguments handled prevents further mouse routing.
public event EventHandler<MouseButtonEventArgs> MouseRightButtonUp