ToggleButtonViewModel

ToggleButtonViewModel

new

A view model which exposes the properties of a toggle button.

Parameters:
Name Type Argument Description
command Command The command which will be executed when the button is toggled.
options Object <optional>
Options defining the button's properties.
Properties
Name Type Argument Default Description
toggled Boolean | Observable <optional>
false A boolean, or observable, indicating whether the button should be initially toggled.
tooltip String | Observable <optional>
'' A string, or observable, containing the button's tooltip.
Source:

Members

:Command

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

:Boolean

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

:String

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