# ContextMenuLocation Enumeration

> Determines the location in the document where a context menu will be shown. The enumeration contains the following values:

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Enumeration
- **Introduced:** 19.0
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.Core.SDK` (assembly `TXTextControl.Core.dll`, from the private NuGet feed or Text Control Offline Packages)
- **Package:** `TXTextControl.TextControl.ASP.SDK` (assembly `TXTextControl.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.dll` from the setup
- **Path:** TX Text Control .NET Server > Reference > TXTextControl > ContextMenuLocation Enumeration
- **1177 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/contextmenulocation/enumeration/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/contextmenulocation/enumeration/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/contextmenulocation/enumeration/llms-full.txt

---

### Description

Determines the location in the document where a context menu will be shown. The enumeration contains the following values:

### Syntax

```csharp
[Flags]
public enum ContextMenuLocation
```

```vbnet
<Flags>
Public Enum ContextMenuLocation
```

### Members

| 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](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/pagenumberfield/llms-full.txt). |
| 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](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/table/llms-full.txt). |
| MisspelledWord | 2048 | The menu context is a [MisspelledWord](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/misspelledword/llms-full.txt). |
| TableOfContents | 4096 | The menu context is a [TableOfContents](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/tableofcontents/llms-full.txt). |
| TrackedChange | 8192 | The menu context is a [TrackedChange](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/trackedchange/llms-full.txt). |
| Comment | 16384 | The menu context is a [CommentedText](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/commentedtext/llms-full.txt). |
| FormField | 32768 | The menu context is a [FormField](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/formfield/llms-full.txt). |
| Footnote | 65536 | The menu context is a [Footnote](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/footnote/llms-full.txt) 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.

```csharp
ContextMenuLocation value = ContextMenuLocation.TextSelection;
Console.WriteLine($"Using Context Menu Location: {value}");
```

```vbnet
Dim value As ContextMenuLocation = ContextMenuLocation.TextSelection
Console.WriteLine($"Using Context Menu Location: {value}")
```

### See Also

[TextContextMenuEventArgs](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-servervisualization/textcontextmenueventargs/llms-full.txt) class, [TextControl.TextContextMenuOpening](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/textcontextmenuopening-event/llms-full.txt) Event, [WPF.TextControl.TextContextMenuOpening](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/textcontextmenuopening-event/llms-full.txt) Event.

---

## Nearby

- **Previous:** [ConditionalInstructionCollection.Remove Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/conditionalinstructioncollection/remove-method/llms-full.txt)
- **Next:** [ControlChars Enumeration](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/controlchars/enumeration/llms-full.txt)
