TX Text Control .NET Server

TextContextMenuEventArgs Class

Class|Introduced in 21.0
Namespace
TXTextControl.ServerVisualisation
Package
TXTextControl.TextControl.Core.SDK from the private NuGet feed or Text Control Offline Packages
Assembly
TXTextControl.Server.Core.dll
Install
dotnet add package TXTextControl.TextControl.Core.SDK .NET 8 and later. For .NET Framework, reference TXTextControl.Server.dll from the setup.
Also in
TXTextControl.TextControl.ASP.SDK as TXTextControl.Server.dll
Inherits
  1. EventArgs
  2. TextContextMenuEventArgs

Description

The TextContextMenuEventArgs class provides data for the ServerVisualization.TextViewGenerator.TextContextMenuOpening event. It provides an array of menu items for a certain location in a document. The ContextMenuLocation property informs for which part of the document the items have been generated.

Syntax

public class TextContextMenuEventArgs : EventArgs

Examples

The following example includes the context menu location value from a Text Context Menu Event Args object in application diagnostics. The created object is then available to the surrounding document workflow.

Console.WriteLine($"Context Menu Location: {textContextMenuEventArgs.ContextMenuLocation}");
Console.WriteLine("Text Context Menu Event Args is ready for use.");

Members

Properties

PropertyDescription
ContextMenuLocationGets the location in the document for which the menu items have been generated. The generated items depend on this location. The property value can be a combination (bitwise or) of the ContextMenuLocation values.
ItemsGets an array of ServerVisualization.MenuItem objects. These objects contain all data necessary to display a context menu.
LocationGets the location, in pixels, where the context menu should be displayed. The coordinates are relative to the top-left corner of the screen.
RightToLeftGets a value indicating whether the context menu must be shown from right to left.