ContextMenuLocation Enumeration
- Namespace
TXTextControl
- Package
TXTextControl.from the private NuGet feed or Text Control Offline PackagesTextControl. WPF. SDK
- Assembly
TXTextControl.dll
- Install
dotnet add package TXTextControl..NET 8 and later. For .NET Framework, referenceTextControl. WPF. SDK TXTextControl.from the setup.dll
Description
Determines the location in the document where a context menu will be shown. The enumeration contains the following values:
Syntax
[]
public enum ContextMenuLocation<Flags>
Public Enum ContextMenuLocationMembers
| Member | Value | Description |
|---|---|---|
| TextSelection | 1 | The menu context is a text selection. |
| TextInputPosition | 2 | The menu context is the text input position. |
| Header | 4 | The menu context is the top page margin which contains a header. |
| NoHeader | 8 | The menu context is the top page margin which contains no header. |
| Footer | 16 | The menu context is the bottom page margin which contains a footer. |
| NoFooter | 32 | The menu context is the bottom page margin which contains no footer. |
| PageMargin | 64 | The menu context is the top or the bottom page margin. |
| PageNumberField | 128 | The menu context is a PageNumberField. |
| SelectedFrame | 256 | The menu context is a selected frame (text frame, image, chart or barcode). |
| Table | 512 | The menu context is a text selection or a text input position in a Table. |
| MisspelledWord | 2048 | The menu context is a MisspelledWord. |
| TableOfContents | 4096 | The menu context is a TableOfContents. |
| TrackedChange | 8192 | The menu context is a TrackedChange. |
| Comment | 16384 | The menu context is a CommentedText. |
| FormField | 32768 | The menu context is a FormField. |
| Footnote | 65536 | The menu context is a Footnote reference mark. |
| TextField | 1024 | Not described in the reference. |
Examples
The following example selects the Text Selection value from the Context Menu Location enumeration and uses it as a documented workflow choice.
ContextMenuLocation value = ContextMenuLocation.TextSelection;
Console.WriteLine($"Using Context Menu Location: {value}");Dim value As ContextMenuLocation = ContextMenuLocation.TextSelection
Console.WriteLine($"Using Context Menu Location: {value}")See Also
TextContextMenuEventArgs class, TextControl.TextContextMenuOpening Event, WPF.TextControl.TextContextMenuOpening Event.