Class: ToggleButtonViewModel

ToggleButtonViewModel

new ToggleButtonViewModel(command, optionsopt)

A view model which exposes the properties of a toggle button.
Parameters:
Name Type Attributes Description
command Command The command which will be executed when the button is toggled.
options Object <optional>
Object with the following properties:
Properties
Name Type Attributes Default Description
toggled Boolean <optional>
false A boolean indicating whether the button should be initially toggled.
tooltip String <optional>
'' A string containing the button's tooltip.
Source:

Members

command :Command

Gets the command which will be executed when the button is toggled.
Type:
Source:

toggled :Boolean

Gets or sets whether the button is currently toggled. This property is observable.
Type:
  • Boolean
Default Value:
  • false
Source:

tooltip :String

Gets or sets the button's tooltip. This property is observable.
Type:
  • String
Default Value:
  • ''
Source: