To learn more about using JavaScript in LeanFT, see Setting up and working with the JavaScript SDK.
For JavaScript code samples, see Code Samples - JavaScript.

ToggleButton

WPF. ToggleButton

ToggleButton

Constructor

new ToggleButton()

A .NET WPF toggle button object. To create an instance of this interface, first create an IButton instance for a button with toggle behavior, and then return the IToggleButton using the IButton.ToggleButton property.

Methods

buttonTestObject() → {WPF.ButtonTO}

Returns the Button test object that this toggle button was accessed from.
Returns:
the Button test object that this toggle button was accessed from.
Type
WPF.ButtonTO

isChecked() → {Promise.<bool>}

Indicates whether this toggle button is checked. For a 3-state toggle button: isChecked returns true for either a Checked or Indeterminate State.
Returns:
a promise that is fulfilled with an indication of whether this toggle button is checked.
Type
Promise.<bool>

isThreeState() → {Promise.<bool>}

Indicates whether this toggle button is able to display three check states.
Returns:
a promise that is fulfilled with an indication of whether this toggle button is able to display three check states.
Type
Promise.<bool>

set(state) → {Promise.<void>}

Sets the value of this toggle button.
Parameters:
Name Type Description
state CheckedState The value to be assigned to this toggle button. Possible values: checked, unchecked, indeterminate.
Returns:
a promise that is fulfilled when the operation is performed.
Type
Promise.<void>

state() → {Promise.<CheckedState>}

Returns the current state of the toggle button. Possible values: checked, unchecked, indeterminate.
Returns:
a promise that is fulfilled with the current state of the toggle button.
Type
Promise.<CheckedState>