TX Text Control .NET for Windows Forms

TextContextMenuOpening Event

Event|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

Occurs immediately before a built-in context menu will be opened. The event handler receives an argument of type TextContextMenuEventArgs containing data related to this event.

Syntax

public event TextContextMenuEventHandler TextContextMenuOpening;

Examples

The following example records useful context when text context menu opening occurs.

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