Skip to main content

TextViewContextMenu Class

Definition​

Assembly:Avalonia.Controls.Documents
Package:Avalonia.Controls.Documents

Shows the host control's Avalonia.Controls.Control.ContextFlyout on right-click and closes it on Escape.

public class TextViewContextMenu

Inheritance: object -> TextViewComponentBase -> TextViewContextMenu

Remarks​

This component works with any Avalonia.Controls.Documents.Primitives.IInteractiveTextHost. For editor-specific selection mini-bar support, see the separate TextEditorSelectionFlyout component.

Constructors​

NameDescription
TextViewContextMenuNo summary available.

TextViewContextMenu Constructor​

public TextViewContextMenu()

Methods​

NameDescription
HideContextMenuHides the context menu if it is currently open.
ShowContextMenuShows the context menu at the current pointer position.

HideContextMenu Method​

Hides the context menu if it is currently open.

public void HideContextMenu()

ShowContextMenu Method​

Shows the context menu at the current pointer position.

public void ShowContextMenu(Avalonia.Controls.Control target)

Parameters​

target Avalonia.Controls.Control

Properties​

NameDescription
IsAttachedGets whether this component is currently attached to a host. Inherited from TextViewComponentBase.