MenuItem Class
- Namespace
TXTextControl.ServerVisualisation
- Package
TXTextControl.from the private NuGet feed or Text Control Offline PackagesTextControl. Core. SDK
- Assembly
TXTextControl.Server. Core. dll
- Install
dotnet add package TXTextControl..NET 8 and later. For .NET Framework, referenceTextControl. Core. SDK TXTextControl.from the setup.Server. dll
- Also in
TXTextControl.asTextControl. ASP. SDK TXTextControl.Server. dll
Description
The MenuItem class provides all data necessary to visualize a menu item, such as the menu's text and the menu's image. An item has an Items property specifying a submenu. If there is no text specified, the menu item is a separator.
Syntax
public class MenuItemPublic Class MenuItemExamples
The following example includes the image value from a Menu Item object in application diagnostics. The created object is then available to the surrounding document workflow.
Console.WriteLine($"Image: {menuItem.Image}");
Console.WriteLine("Menu Item is ready for use.");Console.WriteLine($"Image: {menuItem.Image}")
Console.WriteLine("Menu Item is ready for use.")Members
Properties
| Property | Description |
|---|---|
| Checked | Gets a value indicating whether the menu item is checked. |
| Enabled | Gets a value indicating whether the menu item is enabled. |
| Image | Gets the menu item's image. If the property's value is null, the menu item has no image. |
| ImageName | Not described in the reference. public string ImageName { get; } |
| Items | Gets an array of ServerVisualization.MenuItem objects specifying a submenu. These objects contain all data necessary to display the submenu. If the property's value is null, the item has no submenu. |
| Text | Gets the menu item's text. If the property's value is null, the menu item is a separator. |
Methods
| Method | Description |
|---|---|
| Execute | Executes the menu item. When the menu item opens a dialog box, the method creates and returns a DialogViewGenerator object. Otherwise it performs changes in the document. |