TX Text Control .NET for Windows Forms

ContextMenuLocation 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 the location in the document for which the context menu will be opened. The context menu items, which will be shown, depend on this location. The property value can be a combination (bitwise or) of the ContextMenuLocation values.

Syntax

public ContextMenuLocation ContextMenuLocation { get; }

Examples

The following example uses TextContextMenuEventArgs.ContextMenuLocation while handling TextContextMenuOpening.

textControl.TextContextMenuOpening += (_, e) =>
{
    Console.WriteLine($"Context Menu Location: {e.ContextMenuLocation}");
};

Limitations

Read only.