# MenuItem Class

> The MenuItem class provides a method to build a menu strip with the most common TX Spell .NET features. An array of these items is created by calling the TXSpellChecker.GetMenuItems method. Clicking a MenuItem results in a specific action that depends on the WPF.Proofing.MenuItem.Type property. The class is inherited from the System.Windows.Controls.MenuItem class.

- **Product:** TX Spell .NET for WPF
- **Section:** Reference
- **Kind:** Class
- **Introduced:** 3.0
- **Namespace:** `TXTextControl.WPF.Proofing`
- **Package:** `TXTextControl.TXSpell.WPF.SDK` (assembly `TXSpell.WPF.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXSpell.WPF.dll` from the setup
- **Inherits:** `System.Windows.Controls.MenuItem`
- **Path:** TX Spell .NET for WPF > Reference > TXTextControl.WPF.Proofing > MenuItem Class
- **491 words**
- **Web URL:** https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-wpf-proofing/menuitem/
- **LLMs URL:** https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-wpf-proofing/menuitem/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-wpf-proofing/menuitem/llms-full.txt

---

### Description

The MenuItem class provides a method to build a menu strip with the most common TX Spell .NET features. An array of these items is created by calling the [TXSpellChecker.GetMenuItems](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-wpf-proofing/txspellchecker/getmenuitems-method/llms-full.txt) method. [Clicking a MenuItem](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-wpf-proofing/txspellchecker/menuitemclicked-event/llms-full.txt) results in a specific action that depends on the [WPF.Proofing.MenuItem.Type](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-wpf-proofing/menuitem/type-property/llms-full.txt) property. The class is inherited from the `System.Windows.Controls.MenuItem` class.

### Syntax

```csharp
public class MenuItem : System.Windows.Controls.MenuItem
```

```vbnet
Public Class MenuItem
    Inherits System.Windows.Controls.MenuItem
```

### Examples

The following example includes the type value from a Menu Item object in application diagnostics. The created object is then available to the surrounding document workflow.

```csharp
Console.WriteLine($"Type: {menuItem.Type}");
Console.WriteLine("Menu Item is ready for use.");
```

```vbnet
Console.WriteLine($"Type: {menuItem.Type}")
Console.WriteLine("Menu Item is ready for use.")
```

---

## In This Section

- [MenuItem.Type Property](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-wpf-proofing/menuitem/type-property/llms-full.txt): Gets the type of the MenuItem.

---

## Nearby

- **Previous:** [DialogButtonEventArgs.StateManager Property](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-wpf-proofing/dialogbuttoneventargs/statemanager-property/llms-full.txt)
- **Next:** [MenuItem.Type Property](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-wpf-proofing/menuitem/type-property/llms-full.txt)
