ToggleState Enum

Definition

Contains values that specify the ToggleState of a UI Automation element.

C#
[System.Runtime.InteropServices.ComVisible(true)]
[System.Runtime.InteropServices.Guid("ad7db4af-7166-4478-a402-ad5b77eab2fa")]
public enum ToggleState
C#
public enum ToggleState
Inheritance
ToggleState
Attributes

Fields

Name Value Description
Off 0

The UI Automation element is not selected, checked, marked, or otherwise activated.

On 1

The UI Automation element is selected, checked, marked, or otherwise activated.

Indeterminate 2

The UI Automation element is in an indeterminate state. Indeterminate can be used to indicate whether the user has acted on a control. For example, a check box can appear checked and dimmed, indicating an indeterminate state. Creating an indeterminate state is different from disabling the control. Consequently, a check box in the indeterminate state can still receive the focus. When the user clicks an indeterminate control, the ToggleState cycles to its next value.

Remarks

A control must cycle through its IToggleProvider.ToggleState in this order: On, Off, and, if supported, Indeterminate.

Applies to

Product Versions
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9