WinJS.UI.Command object
Represents a command.
Syntax
<div
data-win-control="WinJS.UI.Command">
</div>
var object = new WinJS.UI.Command();
Members
The Command object has these types of members:
- Constructors
- Events
- Methods
- Properties
Constructors
The Command object has these constructors.
Constructor | Description |
---|---|
Command | Creates a new Command object. |
Events
The Command object has these events.
Event | Description |
---|---|
onclick | Raised when the user clicks the Command. |
oncommandvisibilitychanged | Raised when the value of the Command object's hidden property changes. |
Methods
The Command object has these methods.
Method | Description |
---|---|
addEventListener | Registers an event handler for the specified event. |
dispose | Releases resources held by the Command. Call this method when the Command is no longer needed. After calling this method, the Command becomes unusable. |
removeEventListener | Removes an event handler registered with addEventListener. |
Properties
The Command object has these properties.
Property | Access type | Description |
---|---|---|
Read/write |
Gets or sets a value that indicates whether the Command is disabled. |
|
Read-only |
Gets the DOM element that hosts the Command. |
|
Read/write |
Gets or sets additional CSS classes to apply to the element that hosts the Command. |
|
Read/write |
Gets or sets keyboard navigation behavior in the app bar for Command elements of type "content". This property identifies the element that receives focus within the Command host <div> (or container) when navigating from the left. |
|
Read/write |
Gets or sets a Flyout object that is displayed when the Command is invoked. |
|
Read-only |
Gets a value that indicates whether the Command is hidden. |
|
Read/write |
Gets or sets the Command icon. |
|
Read-only |
Gets or sets the Command identifier. |
|
Read/write |
Gets or sets the Command label. |
|
Read/write |
Gets or sets keyboard navigation behavior in the app bar for Command elements of type "content". This property identifies the element that receives focus within the Command host <div> (or container) when navigating from the right. |
|
Read/write |
Gets or sets the priority of the Command. |
|
Read/write |
Gets or sets the area of the AppBar or ToolBar that hosts this Command. |
|
Read/write |
Gets or sets the selected state of an Command of type "toggle". |
|
Read/write |
Gets or sets the tooltip displayed for the Command. |
|
Read/write |
Gets or sets the type of the command. |
Requirements
Minimum WinJS version |
WinJS 4.0 |
Namespace |
WinJS.UI |