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

Provides the visual lifecycle for drawings hosted in floating blocks, retaining one visual across layer updates and returning it to the object pool on release.

Definition

Namespace:Telerik.WinForms.Documents.UI.UIProviders

Assembly:Telerik.WinControls.RichTextEditor.dll

Syntax:

C#
public abstract class FloatingDrawingUIProvider : IUIProvider

Inheritance: objectFloatingDrawingUIProvider

Implements: IUIProvider

Constructors

Initializes the provider from a floating block and resolves its content box as a drawing layout box.

C#
public FloatingDrawingUIProvider(FloatingBlockLayoutBox floatingBox)
Parameters:floatingBoxFloatingBlockLayoutBox

The floating block whose drawing visual this provider manages.

Properties

Gets the floating content bounds used by the layer's viewport-visibility check.

C#
public RectangleF BoundingRectangle { get; }

Implements: IUIProvider.BoundingRectangle

Gets or sets the layer to which this provider's visual is attached.

C#
public IUILayer ContainingLayer { get; set; }

Implements: IUIProvider.ContainingLayer

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

C#
public UILayerUpdateContext CurrentUpdateContext { get; protected set; }

Gets or sets the drawing content box; it is null when the floating block does not contain drawing content.

C#
public DrawingLayoutBox DrawingBox { get; protected set; }

Gets or sets the visual currently supplied to the containing layer.

C#
public UIElement Element { get; protected set; }

Gets or sets the floating block that supplies the drawing content and its layout state.

C#
public FloatingBlockLayoutBox FloatingBox { get; protected set; }

Gets whether the content is not a drawing box or is a cloned drawing that requires a replacement provider.

C#
public bool IsInvalidated { get; }

Implements: IUIProvider.IsInvalidated

Gets whether the floating block has been removed from the document layout.

C#
public bool IsRemoved { get; }

Implements: IUIProvider.IsRemoved

Methods

Positions the visual using the drawing bounds and view offset; cloned blocks use the floating block's top edge.

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

The current view offset and section layout context.

Implements: IUIProvider.Arrange(UILayerUpdateContext)

Creates the visual for DrawingBox when the provider has no retained element.

C#
protected abstract UIElement CreateUIElement()
Returns:

UIElement

The drawing visual to host in the layer.

Stores context, creates the visual if needed or refreshes the retained visual, and yields it to the layer.

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

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

Returns:

IEnumerable<UIElement>

The single visual managed by this provider.

Implements: IUIProvider.GetUIElements(UILayerUpdateContext)

Clears the visual's layout association, returns it to the current context's object pool, and clears the retained reference.

C#
public void ReleaseElements()

Implements: IUIProvider.ReleaseElements()

Refreshes a retained visual when GetUIElements(UILayerUpdateContext) is called after the visual has already been created.

C#
protected abstract void UpdateRecycledUIElement()

Updates the retained drawing visual for the supplied layer context.

C#
public abstract void UpdateUI(UILayerUpdateContext uILayerUpdateContext)
Parameters:uILayerUpdateContextUILayerUpdateContext

The current presenter and viewport information.

Implements: IUIProvider.UpdateUI(UILayerUpdateContext)