TX Text Control .NET Server

TextContextMenuOpening Event

Event|Introduced in 21.0
Namespace
TXTextControl.ServerVisualisation
Package
TXTextControl.TextControl.Core.SDK as TXTextControl.Server.Core.dll from the private NuGet feed or Text Control Offline Packages
Also in
TXTextControl.TextControl.ASP.SDK as TXTextControl.Server.dll

Description

Occurs when a right mouse click is sent as user input and a context menu should be opened. The event handler receives an argument of type TextContextMenuEventArgs containing data related to this event. The event data contains a list of possible menu items which can be shown for the location where the click occurs.

Syntax

public event TextContextMenuEventHandler TextContextMenuOpening;

Examples

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

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