UIElement
Provides the shared property, transform, painting, hit-testing, and mouse/focus-event behavior for Spreadsheet UI elements built on RadItem.
Definition
Namespace:Telerik.WinControls.Spreadsheet.UI
Assembly:Telerik.WinControls.RadSpreadsheet.dll
Syntax:
public abstract class UIElement : RadItem, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IBindableComponent, IComponent, IDisposable, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode
Inheritance: objectDisposableObjectRadObjectRadElementVisualElementRadComponentElementRadItemUIElement...
Derived Classes:
Implements:
Inherited Members
Constructors
Initializes an element that participates in painting and notifies its parent about mouse input.
public UIElement()
Fields
Reserved for flow-direction compatibility; this field is not registered and remains null.
public static RadProperty FlowDirectionProperty
Identifies the registered property used by Text. Its default value is an empty string.
public static RadProperty TextProperty
Properties
Gets or sets the identifier stored for Spreadsheet UI automation compatibility.
public string AutomationID { get; set; }
Gets or sets the geometry used to clip the element. Setting a non-null value enables the
ClipDrawing default-value override; this compatibility layer applies only
RectangleGeometry bounds.
public Geometry Clip { get; set; }
Gets the dispatcher of the containing RadSpreadsheet when the element is attached to one; otherwise, returns null.
public virtual Dispatcher Dispatcher { get; }
Gets or sets a caller-managed focus flag. This class does not update it when focus changes.
public bool HasReceivedFocus { get; set; }
This property is used internally!
public override bool IsFocusable { get; set; }
Overrides:
Gets or sets a transform. Assigning a different instance immediately applies its supported scale, rotation, or translation values; later changes to that instance are not observed automatically.
public RenderTransform RenderTransform { get; set; }
Gets or sets the text stored in the element's TextProperty. Rendering of the text is supplied by derived elements.
public virtual string Text { get; set; }
Methods
Determines whether the element may be painted. The default implementation paints only visible elements.
protected virtual bool CanPaint(IPaintingContext context)
The painting context for the current pass.
Returns:Reserved for mouse-capture compatibility. The current implementation does not capture the mouse.
public void CaptureMouse()
Resets a registered property so the element no longer uses its locally assigned value.
public void ClearValue(RadProperty property)
The property to reset.
Raises the click event on this element and, while input remains unhandled, on ancestor UI elements when parent notification is enabled.
protected override void DoClick(EventArgs e)
The click event arguments.
Overrides:
Raises the double-click event on this element and, while input remains unhandled, on ancestor UI elements when parent notification is enabled.
protected override void DoDoubleClick(EventArgs e)
The double-click event arguments.
Overrides:
Processes mouse movement on this element and propagates mouse-button event arguments to ancestor UI elements until handled or parent notification is disabled.
protected override void DoMouseMove(MouseEventArgs e)
The mouse-move event arguments.
Overrides:
Processes the mouse wheel on this element and propagates mouse-button event arguments to ancestor UI elements until handled or parent notification is disabled.
protected override void DoMouseWheel(MouseEventArgs e)
The mouse-wheel event arguments.
Overrides:
Calculates the client clip rectangle from border thickness, padding, and transform scale, then intersects it with RectangleGeometry bounds when that geometry is assigned to Clip.
protected override RectangleF GetClipRect()
The client clip rectangle.
Overrides:
Tests the supplied point against the element's shape or transformed bounds. Zero-sized elements are never hit; this implementation does not consult IsHitTestVisible.
Disables theme application after the base element fields have been initialized.
protected override void InitializeFields()
Overrides:
Invalidates the parent's measure when this element's bounds change while it is not auto-sized.
protected override void OnBoundsChanged(RadPropertyChangedEventArgs e)
The property-change details.
Overrides:
Dispatches mouse-down, mouse-up, and mouse-wheel routed events as CLR events when input handling is enabled and the original arguments are unhandled. Click and double-click routed events are not dispatched here; handled mouse input cancels the routed event.
protected override void OnBubbleEvent(RadElement sender, RoutedEventArgs args)
The element that raised the routed event.
argsRoutedEventArgsThe routed event arguments.
Overrides:
Runs base click handling and raises the element's mouse-click event for mouse-button arguments.
protected override void OnClick(EventArgs e)
The click event arguments.
Overrides:
Runs base double-click handling and raises the element's mouse-double-click event for mouse-button arguments.
protected override void OnDoubleClick(EventArgs e)
The double-click event arguments.
Overrides:
Raises MouseClick for this element.
protected virtual void OnMouseClick(MouseButtonEventArgs e)
The mouse-button event arguments.
Raises MouseDoubleClick for this element.
protected virtual void OnMouseDoubleClick(MouseButtonEventArgs e)
The mouse-button event arguments.
Processes base mouse-down behavior, raises the corresponding left- or right-button event, and focuses the element unless the mouse-button arguments were already handled.
protected override void OnMouseDown(MouseEventArgs e)
The mouse event arguments.
Overrides:
Raises MouseLeftButtonDown for this element.
protected virtual void OnMouseLeftButtonDown(MouseButtonEventArgs e)
The mouse-button event arguments.
Raises MouseLeftButtonUp for this element.
protected virtual void OnMouseLeftButtonUp(MouseButtonEventArgs e)
The mouse-button event arguments.
Raises MouseRightButtonDown for this element.
protected virtual void OnMouseRightButtonDown(MouseButtonEventArgs e)
The mouse-button event arguments.
Raises MouseRightButtonUp for this element.
protected virtual void OnMouseRightButtonUp(MouseButtonEventArgs e)
The mouse-button event arguments.
Processes base mouse-up behavior and raises the corresponding left- or right-button event when the arguments are an unhandled MouseButtonEventArgs.
protected override void OnMouseUp(MouseEventArgs e)
The mouse event arguments.
Overrides:
Raises the focus events when the element's focused state changes.
protected override void OnPropertyChanged(RadPropertyChangedEventArgs e)
The property-change details.
Overrides:
Invokes PaintCore(IPaintingContext) only when CanPaint(IPaintingContext) allows the element to be painted.
public void Paint(IPaintingContext context)
The painting context used by the element.
Provides the element-specific painting hook. The base implementation draws nothing.
protected virtual void PaintCore(IPaintingContext context)
The painting context used to draw the element.
Reserved for mouse-capture compatibility. The current implementation does not release mouse capture.
public void ReleaseMouseCapture()
Copies the current values from a supported transform to the underlying Telerik element transform. Scale, rotation, and translation are applied from their axis/angle values; center coordinates are not applied. An unsupported or null transform resets those three underlying transforms.
public void UpdateRenderTransform()
Events
Occurs when the element's focused state changes to focused.
public event EventHandler GotFocus
Occurs when the element's focused state changes to unfocused.
public event EventHandler LostFocus
Occurs when the element receives a mouse click. Setting Handled on the event arguments stops further
routed processing.
public event EventHandler<MouseButtonEventArgs> MouseClick
Occurs when the element receives a mouse double-click. Setting Handled on the event arguments stops
further routed processing.
public event EventHandler<MouseButtonEventArgs> MouseDoubleClick
Declares a mouse-enter event that hides RadItem.MouseEnter. The current UIElement implementation does not raise this event.
public event EventHandler<MouseButtonEventArgs> MouseEnter
Occurs when the element receives a left-button press. Setting Handled on the event arguments stops
further routed processing.
public event EventHandler<MouseButtonEventArgs> MouseLeftButtonDown
Occurs when the element receives a left-button release. Setting Handled on the event arguments stops
further routed processing.
public event EventHandler<MouseButtonEventArgs> MouseLeftButtonUp
Occurs when the element receives a right-button press. Setting Handled on the event arguments stops
further routed processing.
public event EventHandler<MouseButtonEventArgs> MouseRightButtonDown
Occurs when the element receives a right-button release. Setting Handled on the event arguments stops
further routed processing.
public event EventHandler<MouseButtonEventArgs> MouseRightButtonUp