Implementando o padrão de controle Toggle de automação de interface de usuário
Observação
Esta documentação destina.Os desenvolvedores do NET Framework que desejam usar o gerenciado UI Automation classes definidas na System.Windows.Automation namespace.As informações mais recentes sobre UI Automation, consulte API de automação do Windows: Automação da interface do usuário.
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 Mapeamento de Padrão de Controles para Clientes de Automação de IU.
Este tópico contém as seguintes seções.
- Implementation Guidelines and Conventions
- Required Members for IToggleProvider
- Exceptions
- Tópicos relacionados
Implementation Guidelines and Conventions
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.
Um controle deve percorrer suas ToggleState na seguinte ordem: On, Off e suporte, Indeterminate.
TogglePattern does not provide a SetState(newState) method due to issues surrounding the direct setting of a tri-state CheckBox without cycling through its appropriate ToggleState sequence.
The RadioButton control does not implement IToggleProvider, as it is not capable of cycling through its valid states.
Required Members for IToggleProvider
The following properties and methods are required for implementing IToggleProvider.
Required member |
Member type |
Notes |
---|---|---|
Method |
None |
|
Property |
None |
This control pattern has no associated events.
Exceptions
This control pattern has no associated exceptions.
Consulte também
Tarefas
Support Control Patterns in a UI Automation Provider
Obter o estado Toggle de uma caixa de seleção usando automação de interface do usuário
Conceitos
Visão Geral de Padrões de Controle de Automação de Interface de Usuário