Open topic with navigation

# ToggleButton

## WPF. ToggleButton

ToggleButton

## Constructor

## new ToggleButton()

A .NET WPF toggle button object. To create an instance of this object, call the toggleButton property of the relevant WPF Button object.

# 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.<boolean>}

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.<boolean>

## isThreeState() → {Promise.<boolean>}

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.<boolean>

## 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>