# TextContextMenuEventArgs.ContextMenuLocation Property

> Gets the location in the document for which the context menu will be opened. The context menu items, which will be shown, depend on this location. The property value can be a combination (bitwise or) of the ContextMenuLocation values.

- **Product:** TX Text Control .NET for Windows Forms
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 19.0
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.WinForms.SDK` (assembly `TXTextControl.Windows.Forms.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.Windows.Forms.dll` from the setup
- **Path:** TX Text Control .NET for Windows Forms > Reference > TXTextControl > TextContextMenuEventArgs.ContextMenuLocation Property
- **367 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontextmenueventargs/contextmenulocation-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontextmenueventargs/contextmenulocation-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontextmenueventargs/contextmenulocation-property/llms-full.txt

---

### Description

Gets the location in the document for which the context menu will be opened. The context menu items, which will be shown, depend on this location. The property value can be a combination (bitwise or) of the [ContextMenuLocation](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/contextmenulocation/enumeration/llms-full.txt) values.

### Syntax

```csharp
public ContextMenuLocation ContextMenuLocation { get; }
```

```vbnet
Public ReadOnly Property ContextMenuLocation As ContextMenuLocation
```

### Examples

The following example uses `TextContextMenuEventArgs.ContextMenuLocation` while handling `TextContextMenuOpening`.

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

```vbnet
AddHandler textControl.TextContextMenuOpening,
    Sub(sender, e)
        Console.WriteLine($"Context Menu Location: {e.ContextMenuLocation}")
    End Sub
```

### Limitations

Read only.

---

## Nearby

- **Previous:** [TextContextMenuEventArgs Class](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontextmenueventargs/llms-full.txt)
- **Next:** [TextContextMenuEventArgs.Location Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontextmenueventargs/location-property/llms-full.txt)
