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

Supplies the presenter, viewport, and section information used to update a document UI layer.

Definition

Namespace:Telerik.WinForms.Documents.UI.Layers

Assembly:Telerik.WinControls.RichTextEditor.dll

Syntax:

C#
public class UILayerUpdateContext

Inheritance: objectUILayerUpdateContext

Constructors

Initializes a context for querying layout boxes and updating a layer.

C#
public UILayerUpdateContext(PointF? viewOffset, RectangleF viewPort, IUILayerContainer presenter, SectionLayoutBox currentSection)
Parameters:viewOffsetPointF?

The offset used to position layout elements in the view, or null to use the viewport location.

viewPortRectangleF

The viewport rectangle used to find visible layout content.

presenterIUILayerContainer

The presenter that owns the document layout.

currentSectionSectionLayoutBox

The section used to collect floating blocks when viewport filtering is disabled.

Properties

Gets the section used when collecting floating blocks without viewport filtering.

C#
public SectionLayoutBox CurrentSectionBox { get; }

Gets or sets whether GetVisibleFloatingBlocks() filters floating blocks to the viewport instead of collecting all blocks in CurrentSectionBox.

C#
public bool FilterFloatingBlocksWithViewPort { get; set; }

Visible cloned floating blocks are collected in either mode. The result is cached on this context, so set this property before the first call to GetVisibleFloatingBlocks().

Gets the presenter whose document layout is queried for this update.

C#
public IUILayerContainer Presenter { get; }

Gets the offset subtracted from layout coordinates when positioning layer elements in the view.

C#
public PointF ViewOffset { get; }

Gets the viewport rectangle used to determine which layout boxes intersect the visible area.

C#
public RectangleF ViewPort { get; }

Methods

Gets floating-block layout boxes using the filtering mode selected by FilterFloatingBlocksWithViewPort.

C#
public IEnumerable<FloatingBlockLayoutBox> GetVisibleFloatingBlocks()
Returns:

IEnumerable<FloatingBlockLayoutBox>

The floating blocks selected for this context; the result is cached.

Gets layout boxes whose bounds intersect ViewPort.

C#
public IEnumerable<LayoutBox> GetVisibleLayoutBoxes()
Returns:

IEnumerable<LayoutBox>

The visible layout boxes, cached for this context.

Gets visible layout boxes of the specified type.

C#
public IEnumerable<T> GetVisibleLayoutBoxes<T>() where T : LayoutBox
Returns:

IEnumerable<T>

The visible boxes that are instances of T.

Gets visible layout boxes of the specified type that satisfy a filter.

C#
public IEnumerable<T> GetVisibleLayoutBoxes<T>(Predicate<T> filter) where T : LayoutBox
Parameters:filterPredicate<T>

A predicate applied to boxes of type T.

Returns:

IEnumerable<T>

The visible boxes that satisfy filter.

Gets visible text boxes, excluding Enter, line-break, vertical-tab, and page-break formatting symbols.

C#
public IEnumerable<SpanLayoutBox> GetVisibleTextLayoutBoxes()
Returns:

IEnumerable<SpanLayoutBox>

The visible text layout boxes used for text-level layer updates.