This documentation is archived and is not being maintained.

ToggleState Enumeration

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

Namespace:  System.Windows.Automation
Assembly:  UIAutomationTypes (in UIAutomationTypes.dll)

public enum ToggleState

Member nameDescription
OffThe UI Automation element is not selected, checked, marked or otherwise activated.
OnThe UI Automation element is selected, checked, marked or otherwise activated.
IndeterminateThe UI Automation element is in an indeterminate state.

The Indeterminate property 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.

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

.NET Framework

Supported in: 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.