TX Text Control .NET for Windows Forms

TextContextMenu Property

Property|Introduced in 19.0
Namespace
TXTextControl
Package
TXTextControl.TextControl.WinForms.SDK as TXTextControl.Windows.Forms.dll from the private NuGet feed or Text Control Offline Packages

Description

Gets or sets the context menu, which will be shown. The items depend on the document location where the mouse click occurs. The menu can be altered, extended or completely replaced. When this property is set to null, the TextControl uses system menu items. To completely suppress a context menu, the Cancel Property must be set the true.

Syntax

public ContextMenuStrip TextContextMenu { get; set; }

Examples

The following example uses TextContextMenuEventArgs.TextContextMenu while handling TextContextMenuOpening.

textControl.TextContextMenuOpening += (_, e) =>
{
    e.TextContextMenu?.Select();
};