@page @{ ViewData["title"] = "Dynamic Items"; ViewData["page-support"] = "Dynamic"; }
This section adds new menu items to the context menu.
Dynamic items have three types (menu, item, and separator). with properties to add new items with customization explained below in more details.
The types (menu and item) must contain the property title at least and their value cannot be null.
A separator-type item can be added without any properties.
In the following example, it shows how to write add an items to dynamic:
shell
{
dynamic
{
item(title = 'Hello, World!')
separtor
menu(title = 'sub menu' image = #0000ff)
{
item(title = 'test subitem')
}
}
}
| Property | Summary | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Title | Sets a value indicating the caption of the menuitem. This property must be included with menu and item, not Applies to separator. Default = nullApplies to menu, item. |
||||||||||||||||||||||||||||||
| Mode | Accept item by selections behavior. Value have one of the following parameters:
Applies to menu, item, separator. |
||||||||||||||||||||||||||||||
| Type | Specify the types of object files allowed for the menu item to appear. The property is assigned to one or more of these parameters and this character | is used to separate types.Add a character ~ before single type to exclude.
The property not supported syntax expressions.
Applies to menu, item, separator. |
||||||||||||||||||||||||||||||
| Visibility (vis) | Visibility of menuitem and can have one of the following parameters:
Applies to menu, item, separator. |
||||||||||||||||||||||||||||||
| Find |
Accept menuitem when the specified path name or path extension is contains or equal to the current find property. Applies to menu, item, separator. |
||||||||||||||||||||||||||||||
| Separator (sep) | Add separator with menuitem position by parameters:
Applies to menu, item. |
||||||||||||||||||||||||||||||
| Position (pos) | The position at which a menuitem should be inserted into the menu. Position can have one of the following parameters:
Applies to menu, item, separator. |
||||||||||||||||||||||||||||||
| Image, Icon | The icon that appears in a menuitem, This property can be assigned as image files, resource icons, glyph or color. With one of the following parameters
Applies to menu, item. |
||||||||||||||||||||||||||||||
| Command (cmd) | The command associated with the menuitem. Occurs when the menuitem is clicked or selected using a shortcut key or access key defined for the menuitem. Default = nullApplies to item. |
||||||||||||||||||||||||||||||
| Arguments (arg, args) | The parameter to pass to the Command property of a menuitem. Default = nullApplies to item. |
||||||||||||||||||||||||||||||
| Window | Controls how the window is to be shown. can be one of the following parameters:
Hidden, Show, Visible, Minimized, Maximized Default = showApplies to item. |
||||||||||||||||||||||||||||||
| Directory (dir) | Specify the work directory to execute the command. Default = nullApplies to item. |
||||||||||||||||||||||||||||||
| admin | Execute the command with administrative permissions. Default = falseApplies to item. |
||||||||||||||||||||||||||||||
| Verb | Specifies that the operation is the default for the selected file. value type string and can have one of the following parameters:
Applies to item. |
||||||||||||||||||||||||||||||
| Wait |
Waiting Until end of command. Default = falseApplies to item. |
||||||||||||||||||||||||||||||
| Checked |
Value that indicates whether the menuitem is checked.
Applies to item. |
||||||||||||||||||||||||||||||
| Default |
Specifies that the menuitem is the default. A menu can contain only one default menuitem, which is displayed in bold. Default = falseApplies to item. |
The title property must include at least the following types of (menu or item).