New to Telerik UI for WinForms? Start a free 30-day trial

Provides the shared visual lifecycle for inline drawing layout boxes, including hyperlink handling and clipping to section columns.

Definition

Namespace:Telerik.WinForms.Documents.UI.UIProviders

Assembly:Telerik.WinControls.RichTextEditor.dll

Syntax:

C#
public abstract class DrawingUIProvider : HyperlinkUIProviderBase, IUIProvider

Inheritance: objectHyperlinkUIProviderBaseDrawingUIProvider

Implements: IUIProvider

Inherited Members HyperlinkUIProviderBase.RegisterHyperlinkHandlers(UIElement)HyperlinkUIProviderBase.UnregisterHyperlinkHandlers(UIElement)HyperlinkUIProviderBase.UpdateUI(UILayerUpdateContext)HyperlinkUIProviderBase.ContainingLayer

Constructors

Initializes a provider for the drawing layout box whose visual it manages.

C#
public DrawingUIProvider(DrawingLayoutBox drawingBox)
Parameters:drawingBoxDrawingLayoutBox

The layout box that supplies the drawing bounds and associated inline.

Properties

Gets the drawing's control bounds, which the layer uses for viewport visibility.

C#
public override RectangleF BoundingRectangle { get; }

Overrides: HyperlinkUIProviderBase.BoundingRectangle

Gets the update context most recently supplied to GetUIElements(UILayerUpdateContext).

C#
public UILayerUpdateContext CurrentUpdateContext { get; }

Gets the layout box used to position and associate the drawing visual.

C#
protected DrawingLayoutBox DrawingBox { get; }

Gets or sets the framework control that renders the drawing inside the provider's clipping container.

C#
public FrameworkElement DrawingControl { get; set; }

Gets the inline associated with the drawing box, used by the base class for hyperlink interaction.

C#
public override Inline HyperlinkInline { get; }

Overrides: HyperlinkUIProviderBase.HyperlinkInline

Gets whether the drawing box is a clone that requires the layer to replace this provider.

C#
public override bool IsInvalidated { get; }

Overrides: HyperlinkUIProviderBase.IsInvalidated

Gets whether the drawing layout box has been removed from the document layout.

C#
public override bool IsRemoved { get; }

Overrides: HyperlinkUIProviderBase.IsRemoved

Gets or sets whether hyperlink handlers have been attached to the current drawing control.

C#
protected bool IsUIElementRegisteredAsHyperlink { get; set; }

Gets the framework element used to render the drawing and receive hyperlink pointer interaction.

C#
public override FrameworkElement UIElement { get; }

Overrides: HyperlinkUIProviderBase.UIElement

Methods

Positions the drawing relative to the current view and clips it to the section's columns when column layout is active.

C#
public override void Arrange(UILayerUpdateContext uILayerUpdateContext)
Parameters:uILayerUpdateContextUILayerUpdateContext

The current section and view-offset information.

Overrides: HyperlinkUIProviderBase.Arrange(UILayerUpdateContext)

Creates the framework control that renders the drawing box; the result is retained for subsequent layer updates.

C#
protected abstract FrameworkElement CreateDrawingControl()
Returns:

FrameworkElement

The control to host as the drawing visual.

C#
protected abstract SizeF GetDrawingSize()
Returns:

SizeF

Stores context, creates the drawing control on first use or updates the retained control, and yields its clipping container.

C#
public override IEnumerable<UIElement> GetUIElements(UILayerUpdateContext context)
Parameters:contextUILayerUpdateContext

The presenter, viewport, and object-pool state for this layer update.

Returns:

IEnumerable<UIElement>

The container that hosts the drawing control and applies column clipping when needed.

Overrides: HyperlinkUIProviderBase.GetUIElements(UILayerUpdateContext)

Associates the control with the drawing box and attaches hyperlink handlers once when its inline is a hyperlink.

C#
protected void RegisterControl(FrameworkElement result)
Parameters:resultFrameworkElement

The control created for the drawing box.

Detaches hyperlink handlers, clears the drawing control's layout association, and releases the provider's visual references.

C#
public override void ReleaseElements()

Overrides: HyperlinkUIProviderBase.ReleaseElements()

Refreshes a drawing control that has already been created when the layer requests its visual again.

C#
protected abstract void UpdateRecycledUIElement()