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:
public abstract class FloatingDrawingUIProvider : IUIProvider
Inheritance: objectFloatingDrawingUIProvider
Implements:
Constructors
Initializes the provider from a floating block and resolves its content box as a drawing layout box.
public FloatingDrawingUIProvider(FloatingBlockLayoutBox floatingBox)
The floating block whose drawing visual this provider manages.
Properties
Gets the floating content bounds used by the layer's viewport-visibility check.
public RectangleF BoundingRectangle { get; }
Implements:
Gets or sets the layer to which this provider's visual is attached.
public IUILayer ContainingLayer { get; set; }
Implements:
Gets the context most recently supplied to GetUIElements(UILayerUpdateContext).
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.
public DrawingLayoutBox DrawingBox { get; protected set; }
Gets or sets the visual currently supplied to the containing layer.
public UIElement Element { get; protected set; }
Gets or sets the floating block that supplies the drawing content and its layout state.
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.
public bool IsInvalidated { get; }
Implements:
Methods
Positions the visual using the drawing bounds and view offset; cloned blocks use the floating block's top edge.
public void Arrange(UILayerUpdateContext uILayerUpdateContext)
The current view offset and section layout context.
Implements:
Creates the visual for DrawingBox when the provider has no retained element.
protected abstract UIElement CreateUIElement()
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.
public IEnumerable<UIElement> GetUIElements(UILayerUpdateContext context)
The presenter, viewport, and object-pool state for this layer update.
Returns:IEnumerable<UIElement>
The single visual managed by this provider.
Implements:
Clears the visual's layout association, returns it to the current context's object pool, and clears the retained reference.
public void ReleaseElements()
Implements:
Refreshes a retained visual when GetUIElements(UILayerUpdateContext) is called after the visual has already been created.
protected abstract void UpdateRecycledUIElement()
Updates the retained drawing visual for the supplied layer context.
public abstract void UpdateUI(UILayerUpdateContext uILayerUpdateContext)
The current presenter and viewport information.
Implements: