Implementando o padrão de controle SelectionItem de automação de interface do 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 ISelectionItemProvider, including information about properties, methods, and events. Links to additional references are listed at the end of the overview.
The SelectionItemPattern control pattern is used to support controls that act as individual, selectable child items of container controls that implement ISelectionProvider. For examples of controls that implement the SelectionItem 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 ISelectionItemProvider
- Exceptions
- Tópicos relacionados
Implementation Guidelines and Conventions
When implementing the Selection Item control pattern, note the following guidelines and conventions:
- Single-selection controls that manage child controls that implement IRawElementProviderFragmentRoot, such as the Screen Resolution slider in the Display Properties dialog box, should implement ISelectionProvider and their children should implement both IRawElementProviderFragment and ISelectionItemProvider.
Required Members for ISelectionItemProvider
The following properties, methods, and events are required for implementing ISelectionItemProvider.
Required members |
Member type |
Notes |
---|---|---|
Property |
None |
|
Property |
None |
|
Method |
None |
|
Event |
Raised when a selection in a container has changed significantly and requires sending more ElementSelectedEvent and ElementRemovedFromSelectionEvent events than the InvalidateLimit constant permits. |
- If the result of a Select, an AddToSelection, or a RemoveFromSelection is a single selected item, an ElementSelectedEvent should be raised; otherwise send ElementAddedToSelectionEvent/ ElementRemovedFromSelectionEvent as appropriate.
Exceptions
Providers must throw the following exceptions.
Exception type |
Condition |
---|---|
When any of the following are attempted:
|
Consulte também
Tarefas
Support Control Patterns in a UI Automation Provider
Conceitos
Visão Geral de Padrões de Controle de Automação de Interface de Usuário
Padrões de Controle para Clientes de Automação de IU
Implementando o padrão de controle Selection de automação de interface do usuário