Implementing the UI Automation Toggle Control Pattern
This documentation is intended for .NET Framework developers who want to use the managed UI Automation classes defined in the System.Windows.Automation namespace. For the latest information about UI Automation, see Windows Automation API: UI Automation.
This topic introduces guidelines and conventions for implementing IToggleProvider, including information about methods and properties. Links to additional references are listed at the end of the topic.
The TogglePattern control pattern is used to support controls that can cycle through a set of states and maintain a state once set. For examples of controls that implement this control pattern, see Control Pattern Mapping for UI Automation Clients.
When implementing the Toggle control pattern, note the following guidelines and conventions:
Controls that do not maintain state when activated, such as buttons, toolbar buttons, and hyperlinks, must implement IInvokeProvider instead.
The RadioButton control does not implement IToggleProvider, as it is not capable of cycling through its valid states.
The following properties and methods are required for implementing IToggleProvider.
|Required member||Member type||Notes|
This control pattern has no associated events.
This control pattern has no associated exceptions.
UI Automation Control Patterns Overview
Support Control Patterns in a UI Automation Provider
UI Automation Control Patterns for Clients
Get the Toggle State of a Check Box Using UI Automation
UI Automation Tree Overview
Use Caching in UI Automation