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

Displays the active mention provider's suggestions in a popup anchored to the editor's caret.

Definition

Namespace:Telerik.WinControls.RichTextEditor.UI

Assembly:Telerik.WinControls.RichTextEditor.dll

Syntax:

C#
public class MentionBox : IMentionBox

Inheritance: objectMentionBox

Implements: IMentionBox

Constructors

Initializes the popup and the list picker used to display mention suggestions.

C#
public MentionBox()

Properties

Gets or sets the index of the focused suggestion.

C#
public int FocusedItemIndex { get; set; }

Implements: IMentionBox.FocusedItemIndex

The setter wraps indices past either end of the available items and does nothing when the list is empty.

Gets a value indicating whether the suggestion popup is open.

C#
public bool IsOpen { get; }

Implements: IMentionBox.IsOpen

Gets the popup host that contains the mention picker.

C#
public RadPopupControlBase Popup { get; }

Gets or sets the size applied to the popup when it opens.

C#
public Size PopupSize { get; set; }

Methods

When the popup is open, hides it, clears the picker data context, and hides the editor's mention context.

C#
public void Hide()

Implements: IMentionBox.Hide()

Opens the popup using its current editor and picker state.

C#
public void Show()

Use Show(RadRichTextBox) to bind the popup to an editor and position it at the caret.

Loads the editor's active mention suggestions and displays the popup at its caret when the popup is closed.

C#
public void Show(RadRichTextBox richTextBox)
Parameters:richTextBoxRadRichTextBox

The editor whose mention suggestions are displayed.

Implements: IMentionBox.Show(RadRichTextBox)

If the editor or its active presenter is null, this method leaves the popup unchanged. When the popup is already open, the picker data is refreshed but its existing editor owner is retained.