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

Renders the current document selection and delegates selection adorners for registered inline types.

Definition

Namespace:Telerik.WinForms.Documents.UI.Layers

Assembly:Telerik.WinControls.RichTextEditor.dll

Syntax:

C#
public class SelectionUILayer : IUILayer

Inheritance: objectSelectionUILayer

Implements: IUILayer

Constructors

Initializes the selection path and handler registry for the specified document editor.

C#
public SelectionUILayer(IDocumentEditorPresenterContainer documentEditor)
Parameters:documentEditorIDocumentEditorPresenterContainer

The editor whose selection and visual settings this layer displays.

Fields

Gets or sets the section used to limit custom inline selection handling and selection markers during viewport updates.

C#
public SectionLayoutBox currentSectionLayoutBox

Properties

Gets or sets whether the selection layer's visuals participate in hit testing.

C#
public bool IsHitTestVisible { get; set; }

Implements: IUILayer.IsHitTestVisible

Gets the identifier used to register the selection layer.

C#
public string Name { get; }

Implements: IUILayer.Name

Gets whether the presenter clips this layer to the displayed section's bounds; this layer returns false.

C#
public bool ShouldClip { get; }

Implements: IUILayer.ShouldClip

Gets whether the presenter updates this layer even when it has not been invalidated; this layer returns true.

C#
public bool ShouldUpdateWhenNotInvalidated { get; }

Implements: IUILayer.ShouldUpdateWhenNotInvalidated

Methods

Does nothing because selection geometry is positioned during viewport updates.

C#
public void ArrangeChildren()

Implements: IUILayer.ArrangeChildren()

Leaves the persistent selection path in place; its geometry is refreshed by UpdateViewPort(UILayerUpdateContext).

C#
public void ClearChildren()

Implements: IUILayer.ClearChildren()

Does nothing; this layer refreshes selection visuals through viewport updates.

C#
public void DoOnPresentationChanged()

Implements: IUILayer.DoOnPresentationChanged()

Gets the visual container that hosts the selection path and selection markers.

C#
public UIElement GetLayerUIElement()
Returns:

UIElement

The selection layer's visual container.

Implements: IUILayer.GetLayerUIElement()

Registers a handler to display selection UI when a single selected inline has the specified runtime type. Registering another handler for the same type replaces the previous handler.

C#
public void RegisterInlineSelectionHandler(Type inlineType, IInlineSelectionHandler selectionHandler)
Parameters:inlineTypeType

The exact inline type handled by selectionHandler.

selectionHandlerIInlineSelectionHandler

The handler that displays and hides selection UI for that inline type.

Removes the handler registered for the specified inline type.

C#
public void UnregisterInlineSelectionHandler(Type inlineType)
Parameters:inlineTypeType

The inline type whose handler should be removed.

Updates visible selection geometry, using a registered handler for a single selected inline when applicable.

C#
public void UpdateUIViewPort(PointF viewOffset, RectangleF viewPort)
Parameters:viewOffsetPointF

The offset applied to the selection layer's visual container.

viewPortRectangleF

The visible rectangle used to calculate selection geometry.

Stores the current section and refreshes selection geometry and, where supported, selection markers.

C#
public virtual void UpdateViewPort(UILayerUpdateContext context)
Parameters:contextUILayerUpdateContext

The current presenter and viewport information.

Implements: IUILayer.UpdateViewPort(UILayerUpdateContext)