Поделиться через


ToggleState Enumeration

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Contains values that specify the ToggleState of a UI automation element

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

Syntax

'Declaration
Public Enumeration ToggleState
public enum ToggleState

Members

Member name Description
Supported by Silverlight for Windows Phone Off The UI automation element is not selected, checked, marked, or otherwise activated.
Supported by Silverlight for Windows Phone On The UI automation element is selected, checked, marked, or otherwise activated.
Supported by Silverlight for Windows Phone Indeterminate The UI automation element is in an indeterminate state.

Remarks

A control must cycle through its ToggleState in this order:

  1. On

  2. Off

  3. Indeterminate (if supported)

The Indeterminate value can be used to indicate whether the user has acted on a control. For example, a check box can be displayed as both checked and dimmed, which indicates 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 value cycles to the next value.

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.