Files
Shell/docs/Syntax/Dynamic.cshtml
T
2021-12-06 18:55:28 +02:00

394 lines
13 KiB
Plaintext

@page
@{
ViewData["title"] = "Dynamic Items";
ViewData["page-support"] = "Dynamic";
}
<h4>Dynamic Items</h4>
<br>
<p>This section adds new menu items to the context menu.</p>
<p>Dynamic items have three types (menu, item, and separator). with properties to add new items with customization explained below in more details.<br>The types (menu and item) must contain the property title at least and their value cannot be <span class="syntax-keyword">null</span>.<br>A separator-type item can be added without any properties.</p>
<p>In the following example, it shows how to write add an items to dynamic:</p>
<pre class="syntax"><code>shell
{
dynamic
{
item(title = <span class="syntax-string">'Hello, World!'</span>)
separtor
menu(title = <span class="syntax-string">'sub menu'</span> image = <span class="syntax-number">#0000ff</span>)
{
item(title = <span class="syntax-string">'test subitem'</span>)
}
}
}</code></pre>
<br>
<br>
<h4>Properties</h4>
<div class="table-responsive">
<table class="table">
<thead>
<tr>
<th scope="col">Property</th>
<th scope="col">Summary</th>
</tr>
</thead>
<tbody>
<tr>
<td>Title</td>
<td>Sets a value indicating the caption of the menuitem.<br/>
<p class="text-danger">This property must be included with menu and item, not Applies to separator.</p>
Default = <span class="syntax-keyword">null</span>
<p class="syntax-prop">Applies to menu, item.</p>
</td>
</tr>
<tr>
<td>Mode</td>
<td>Accept item by selections behavior. Value have one of the following parameters:
<table class="table">
<tr>
<td class="syntax-keyword">None</td>
<td>Accept item when there are no selections.</td>
</tr>
<tr>
<td class="syntax-keyword">Single</td>
<td>Accept menuitem when there are single selection.</td>
</tr>
<tr>
<td class="syntax-keyword">MultiUnique</td>
<td>Accept when multiple selections are single type.</td>
</tr>
<tr>
<td class="syntax-keyword">MultiSingle</td>
<td>Accept when multiple selections are single file extension.</td>
</tr>
<tr>
<td class="syntax-keyword">Multiple</td>
<td>Accept all types.</td>
</tr>
</table>
Default = <span class="syntax-keyword">Single</span>
<p class="syntax-prop">Applies to menu, item, separator.</p>
</td>
</tr>
<tr>
<td>Type</td>
<td>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 <code>|</code> is used to separate types.<br/>
Add a character <code>~</code> before single type to exclude.
<p class="has-text-danger">The property not supported syntax expressions.</p>
<table class="table">
<tr>
<td class="syntax-keyword">File</td>
<td>Accept menuitem when file are selected.</td>
</tr>
<tr>
<td class="syntax-keyword">Dirctory(Dir)</td>
<td>Accept menuitem when Dirctory are selected.</td>
</tr>
<tr>
<td class="syntax-keyword">Drive</td>
<td>Drive objects</td>
</tr>
<tr>
<td class="syntax-keyword">USB</td>
<td>Accept menuitem when USB flash drive are selected.</td>
</tr>
<tr>
<td class="syntax-keyword">DVD</td>
<td>The drive is a DVD-ROM drive</td>
</tr>
<tr>
<td class="syntax-keyword">Fixed</td>
<td>Accept menuitem when Fixed drive are selected. The drive has fixed media; for example, a hard disk drive or flash drive.</td>
</tr>
<tr>
<td class="syntax-keyword">VHD</td>
<td>Accept menuitem when Virtual Hard Disk are selected.</td>
</tr>
<tr>
<td class="syntax-keyword">Removable</td>
<td>The drive has removable media; for example, a floppy drive, thumb drive, or flash card reader.</td>
</tr>
<tr>
<td class="syntax-keyword">Remote</td>
<td>The drive is a remote (network) drive.</td>
</tr>
<tr>
<td class="syntax-keyword">Back</td>
<td>Accept menu item when the background of all types are selected or can specify of this types for the background (back.directory, back.drive[back.fixed, back.usb, back.dvd, back.vhd, back.Removable], back.namespace[back.computer, back.recyclebin])
</td>
</tr>
<tr>
<td class="syntax-keyword">Desktop</td>
<td>Accept menuitem when the Desktop are selected.</td>
</tr>
<tr>
<td class="syntax-keyword">Namespace</td>
<td>Accept menuitem when Namespace are selected. Can be virtual objects such as the My Network Places and Recycle Bin.</td>
</tr>
<tr>
<td class="syntax-keyword">Computer</td>
<td>Accept menuitem when the My Computer are selected.</td>
</tr>
<tr>
<td class="syntax-keyword">Recyclebin</td>
<td>Accept menuitem when the Recycle bin are selected.</td>
</tr>
<tr>
<td class="syntax-keyword">Taskbar</td>
<td>Accept menuitem when the Taskbar are selected.</td>
</tr>
</table>
Default = <span class="syntax-keyword">All types</span>
<p class="syntax-prop">Applies to menu, item, separator.</p>
</td>
</tr>
<tr>
<td>Visibility (vis)</td>
<td>Visibility of menuitem and can have one of the following parameters:
<table class="table">
<tr>
<td class="syntax-keyword">Hidden</td>
<td>Them menuitem will not be displayed.</td>
</tr>
<tr>
<td class="syntax-keyword">Enable, Normal</td>
<td>Enabled the menuitem.</td>
</tr>
<tr>
<td class="syntax-keyword">Disable</td>
<td>Disabled the menuitem.</td>
</tr>
<tr>
<td class="syntax-keyword">Extended</td>
<td>The menuitem appears when the <kbd>Shift</kbd> key is pressed.</td>
</tr>
<tr>
<td class="syntax-keyword">ExtendedHidden</td>
<td>The item appears disabled when the <kbd>Shift</kbd> key is pressed.</td>
</tr>
<tr>
<td class="syntax-keyword">ExtendedDisable</td>
<td>Hide the menuitem when the <kbd>Shift</kbd> key is pressed.</td>
</tr>
</table>
Default = <span class="syntax-keyword">Normal</span>
<p class="syntax-prop">Applies to menu, item, separator.</p>
</td>
</tr>
<tr>
<td>Find</td>
<td>
<p>Accept menuitem when the specified path name or path extension is contains or equal to the current find property.<br />Use this delimiter <code>|</code> to separate patterns.</p>
Default = <span class="syntax-keyword">null</span>
<p class="syntax-prop">Applies to menu, item, separator.</p>
</td>
</tr>
<tr>
<td>Separator (sep)</td>
<td>Add separator with menuitem position by parameters:
<table class="table">
<tr>
<td class="syntax-keyword">None</td>
<td>Not adding a separator with the menuitem.</td>
</tr>
<tr>
<td class="syntax-keyword">Before</td>
<td>Add a separator before the menuitem.</td>
</tr>
<tr>
<td class="syntax-keyword">After</td>
<td>Add a separator after the menuitem.</td>
</tr>
<tr>
<td class="syntax-keyword">Both</td>
<td>Add a separator before and after the menuitem.</td>
</tr>
</table>
Default = <span class="syntax-keyword">none</span>
<p class="syntax-prop">Applies to menu, item.</p>
</td>
</tr>
<tr>
<td>Position (pos)</td>
<td>The position at which a menuitem should be inserted into the menu.<br/>Position can have one of the following parameters:
<table class="table">
<tr>
<td class="syntax-keyword">Auto</td>
<td>Insert the menuitem to the current position.</td>
</tr>
<tr>
<td class="syntax-keyword">Middle</td>
<td>Insert the menuitem to the middle of the menu.</td>
</tr>
<tr>
<td class="syntax-keyword">Top</td>
<td>Insert the menuitem to the top of the menu.</td>
</tr>
<tr>
<td class="syntax-keyword">Bottom</td>
<td>Insert the menuitem to the bottom of the menu.</td>
</tr>
<tr>
<td class="syntax-keyword">Number sets</td>
<td>Insert the menuitem to a specified position with integer numbers.</td>
</tr>
</table>
Default = <span class="syntax-keyword">auto</span>
<p class="syntax-prop">Applies to menu, item, separator.</p>
</td>
</tr>
<tr>
<td>Image, Icon</td>
<td>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
<table class="table">
<tr>
<td class="syntax-keyword">null</td>
<td>Show menuitem without icon.</td>
</tr>
<tr>
<td class="syntax-keyword">Inherit</td>
<td>@*Inheriting the image from the parent.*@
Inherits this property from its parent element.</td>
</tr>
<tr>
<td class="syntax-keyword">Cmd</td>
<td>Assign image from the command property.</td>
</tr>
<tr>
<td class="syntax-keyword">Glyph</td>
<td>Assign image as Glyph.</td>
</tr>
<tr>
<td class="syntax-keyword">Color</td>
<td>Assign image as color.</td>
</tr>
<tr>
<td class="syntax-keyword">Path</td>
<td>Assign image from location path or resource icon.</td>
</tr>
</table>
Default = <span class="syntax-keyword">null</span>
<p class="syntax-prop">Applies to menu, item.</p>
</td>
<tr>
<td>Command (cmd)</td>
<td><p>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.</p>
Default = <span class="syntax-keyword">null</span>
<p class="syntax-prop">Applies to item.</p>
</td>
</tr>
<tr>
<td>Arguments (arg, args)</td>
<td><p>The parameter to pass to the Command property of a menuitem.</p>
Default = <span class="syntax-keyword">null</span>
<p class="syntax-prop">Applies to item.</p>
</td>
</tr>
<tr>
<td>Window</td>
<td>Controls how the window is to be shown. can be one of the following parameters:
<p class="syntax-keyword">Hidden, Show, Visible, Minimized, Maximized</p>
Default = <span class="syntax-keyword">show</span>
<p class="syntax-prop">Applies to item.</p>
</td>
</tr>
<tr>
<td>Directory (dir)</td>
<td><p>Specify the work directory to execute the command.</p>
Default = <span class="syntax-keyword">null</span>
<p class="syntax-prop">Applies to item.</p></td>
</tr>
<tr>
<td>admin</td>
<td><p>Execute the command with administrative permissions.</p>
Default = <span class="syntax-keyword">false</span>
<p class="syntax-prop">Applies to item.</p>
</td>
</tr>
<tr>
<td>Verb</td>
<td>Specifies that the operation is the default for the selected file. value type string and can have one of the following parameters:<br/>
<table class="table">
<tr>
<td>null</td>
<td>Specifies that the operation is the default for the selected file type.</td>
</tr>
<tr>
<td>Open</td>
<td>Opens a file or a application.</td>
</tr>
<tr>
<td>OpenAs</td>
<td>Opener dialog when no program is associated to the extension.</td>
</tr>
<tr>
<td>RunAs</td>
<td>In Windows 7 and Vista, opens the UAC dialog andin others, open the Run as... Dialog.</td>
</tr>
<tr>
<td>Edit</td>
<td>Opens the default text editor for the file.</td>
</tr>
<tr>
<td>Explore</td>
<td>Opens the Windows Explorer in the folder specified in Directory.</td>
</tr>
<tr>
<td>Properties</td>
<td>Opens the properties window of the file.</td>
</tr>
<tr>
<td>Print</td>
<td>Start printing the file with the default application.</td>
</tr>
<tr>
<td>Find</td>
<td>Start a search.</td>
</tr>
</table>
Default = <span class="syntax-keyword">open</span>
<p class="syntax-prop">Applies to item.</p>
</td>
</tr>
<tr>
<td>Wait</td>
<td>
<p>Waiting Until end of command.</p>
Default = <span class="syntax-keyword">false</span>
<p class="syntax-prop">Applies to item.</p>
</td>
</tr>
<tr>
<td>Checked</td>
<td>
<p>Value that indicates whether the menuitem is checked.</p>
<table class="table">
<tr>
<td class="syntax-number">0</td>
<td>No checked mark.</td>
</tr>
<tr>
<td class="syntax-number">1</td>
<td>Displays menu item using a check mark.</td>
</tr>
<tr>
<td class="syntax-number">2</td>
<td>Displays menu item using a radio-button mark instead of a check mark.</td>
</tr>
</table>
Default = <span class="syntax-number">0</span>
<p class="syntax-prop">Applies to item.</p>
</td>
</tr>
<tr>
<td>Default</td>
<td>
<p>Specifies that the menuitem is the default. A menu can contain only one default menuitem, which is displayed in bold.</p>
Default = <span class="syntax-keyword">false</span>
<p class="syntax-prop">Applies to item.</p>
</td>
</tr>
</tbody>
</table>
</div>
<p>The <code>title</code> property must include at least the following types of (menu or item).</p>