WinJS.UI.SplitViewCommand object

A command to be displayed in a SplitView object.

Syntax

<div 
    data-win-control="WinJS.UI.SplitViewCommand">
</div>
var object = new WinJS.UI.SplitViewCommand();

Members

The SplitViewCommand object has these types of members:

  • Constructors
  • Events
  • Methods
  • Properties

Constructors

The SplitViewCommand object has these constructors.

Constructor Description
SplitViewCommand

Creates a new SplitViewCommand object.

 

Events

The SplitViewCommand object has these events.

Event Description
oninvoked

Raised when the SplitViewCommand is invoked.

 

Methods

The SplitViewCommand object has these methods.

Method Description
addEventListener

Registers an event handler for the specified event.

dispatchEvent

Raises an event of the specified type and with additional properties.

dispose

Releases resources held by this SplitViewCommand. Call this method when the SplitViewCommand is no longer needed. After calling this method, the SplitViewCommand becomes unusable.

removeEventListener

Removes an event handler registered with addEventListener.

 

Properties

The SplitViewCommand object has these properties.

Property Access type Description

element

Read-only

Gets the DOM element that hosts the SplitViewCommand.

icon

Read/write

Gets or sets the SplitViewCommand icon.

label

Read/write

Gets or sets the SplitViewCommand label.

tooltip

Read/write

Gets or sets the tooltip of the SplitViewCommand.

 

Remarks

CSS classes

To customize the SplitViewCommand, you can define your own styles for these Cascading Style Sheets (CSS) classes (defined by the Windows Library for JavaScript style sheets):

CSS class Description

win-splitviewcommand

Styles the entire SplitViewCommand.

win-splitviewcommand-button

Styles the button portion of the SplitViewCommand.

win-splitviewcommand-icon

Styles the SplitViewCommand object's icon box.

win-splitviewcommand-icononly

Styles entire SplitViewCommand when it contains an icon but no label.

win-splitviewcommand-label

Styles the label of a SplitViewCommand.

win-splitviewcommand-labelonly

Styles the entire SplitViewCommand when it contains a label but no icon.

win-splitviewcommand-splitbutton

Styles the split button of a SplitViewCommand.

win-splitviewcommand-splitbutton-opened

Styles the split button of a SplitViewCommand when the split button is open.

 

Requirements

Minimum WinJS version

WinJS 4.2

Namespace

WinJS.UI

See also

WinJS.UI Namespace

Designers

Command patterns

Navigation patterns