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

Builds and positions text-block visuals for a paragraph line, invalidating them when relevant formatting changes.

Definition

Namespace:Telerik.WinForms.Documents.UI.UIProviders

Assembly:Telerik.WinControls.RichTextEditor.dll

Syntax:

C#
public class LineUIProvider : IUIProvider

Inheritance: objectLineUIProvider

Implements: IUIProvider

Constructors

Initializes a provider for the specified paragraph line and selects its positioning anchor.

C#
public LineUIProvider(ParagraphLineInfo info)
Parameters:infoParagraphLineInfo

The line whose text visuals this provider manages.

Properties

Gets the line's layout bounds, using the first inline box for its horizontal origin.

C#
public RectangleF BoundingRectangle { get; }

Implements: IUIProvider.BoundingRectangle

Gets or sets the layer that hosts this line's text-block visuals.

C#
public IUILayer ContainingLayer { get; set; }

Implements: IUIProvider.ContainingLayer

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

C#
protected UILayerUpdateContext CurrentUpdateContext { get; }

Gets whether formatting or revision-range changes require this line's visuals to be recreated.

C#
public bool IsInvalidated { get; }

Implements: IUIProvider.IsInvalidated

Gets whether the first inline box was removed or no longer belongs to this line.

C#
public bool IsRemoved { get; }

Implements: IUIProvider.IsRemoved

Gets the inline box selected as the positioning anchor for this line's visuals.

C#
protected InlineLayoutBox LeftMostBox { get; }

Gets the layout information used to build and position this line's visuals.

C#
public ParagraphLineInfo ParagraphLineInfo { get; }

Methods

Positions the line's text blocks relative to the current view and schedules a revision-range check.

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

The current layer context, including its view offset.

Implements: IUIProvider.Arrange(UILayerUpdateContext)

Lazily creates the text-block visuals for the line and returns their hosted UI elements.

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

The layer context used to create the visuals.

Returns:

IEnumerable<UIElement>

The UI elements representing the line's text.

Implements: IUIProvider.GetUIElements(UILayerUpdateContext)

Detaches formatting-change handlers, returns text blocks and their runs to the object pool, and clears provider state.

C#
public virtual void ReleaseElements()

Implements: IUIProvider.ReleaseElements()

Stores the context used by subsequent layout and release operations.

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

The current layer context.

Implements: IUIProvider.UpdateUI(UILayerUpdateContext)