UI Automation Support for the DataItem Control Type
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.
Este tópico fornece informações sobre Microsoft UI Automation suporte para o DataItem o tipo de controle. Em UI Automation um tipo de controle é um conjunto de condições que um controle deve atender para usar o ControlTypeProperty propriedade. The conditions include specific guidelines for UI Automation tree structure, UI Automation property values and control patterns.
An entry in a Contacts list is an example of a data item control. A data item control contains information that is of interest to an end user. It is more complicated than the simple list item because it contains richer information.
The following sections define the required UI Automation tree structure, properties, control patterns, and events for the DataItem control type. O UI Automation requisitos se aplicam a todos os dados a controles de item, se Windows Presentation Foundation (WPF), Win32, ou Windows Forms.
Este tópico contém as seguintes seções.
- Required UI Automation Tree Structure
- Required UI Automation Properties
- Required UI Automation Control Patterns
- Working with Data Items in Large Lists
- Required UI Automation Events
- DataItem Control Type Example
- Tópicos relacionados
Required UI Automation Tree Structure
The following table depicts the control view and the content view of the UI Automation tree that pertains to data item controls and describes what can be contained in each view. For more information about the UI Automation tree, see Visão geral da árvore de automação de interface do usuário.
UI Automation Tree - Control View |
UI Automation Tree - Content View |
---|---|
DataItem
|
DataItem
|
Um elemento de item de dados em uma grade de dados pode hospedar uma variedade de objetos, incluindo outra camada de itens de dados ou elementos de grade específicos como, por exemplo, texto, imagens ou controles de edição. Se o elemento de item de dados tem uma função de objeto específico, o elemento deve ser exposto como um tipo específico de controle; Por exemplo, um ListItem tipo de controle para um item de dados selecionável na grade.
Required UI Automation Properties
The following table lists the properties whose value or definition is especially relevant to data item controls. For more information about UI Automation properties, see UI Automation Properties for Clients.
Property |
Value |
Notes |
---|---|---|
See notes. |
The value of this property needs to be unique across all controls in an application. |
|
See notes. |
The outermost rectangle that contains the whole control. |
|
See notes. |
Supported if there is a bounding rectangle. If not every point within the bounding rectangle is clickable, and you perform specialized hit testing, then override and provide a clickable point. |
|
DataItem |
This value is the same for all UI frameworks. |
|
True |
The data item control must always be content. |
|
True |
The data item control must always be a control. |
|
See notes. |
If the control can receive keyboard focus, it must support this property. |
|
See notes. |
If the control contains status that is being updated dynamically then this property must be supported so that an assistive technology can receive updates when the status of the element changes. |
|
See notes. |
This is the string value that conveys to the end user the underlying object that the item represents. Examples are "Media File" or "Contact". |
|
Null |
Data item controls do not have a static text label. |
|
"data item" |
Localized string corresponding to the DataItem control type. |
|
See notes. |
The data item control always contains a primary text element that relates to what the user would associate as the most semantic identifier for the item. |
Required UI Automation Control Patterns
The following table lists the Microsoft UI Automation control patterns required to be supported by all data item controls. For more information about control patterns, see Visão Geral de Padrões de Controle de Automação de Interface de Usuário.
Padrão de controle |
Support |
Notes |
---|---|---|
Depends |
If the data item can be expanded or collapsed to show and hide information, the Expand Collapse pattern must be supported. |
|
Depends |
Data items will support the Grid Item pattern when a collection of data items is available within a container that can be spatially navigated item-to-item. |
|
Depends |
All data items support the ability to be scrolled into view with the Scroll Item pattern when their data container has more items than can fit on the screen. |
|
Yes |
All data items must support the Selection Item pattern to indicate when the item is selected. |
|
Depends |
If the data item is contained within a Data Grid control type then it will support this pattern. |
|
Depends |
If the data item contains a state that can be cycled through. |
|
Depends |
If the data item's primary text is editable then the Value pattern must be supported. |
Working with Data Items in Large Lists
Large lists are often data virtualized within UI frameworks to assist in performance. Devido a isso, um o cliente de automação da interface do usuário não é possível usar o UI Automation recurso de consulta para arranhar o conteúdo da árvore inteira da mesma forma que ele possa em outros recipientes de item. Um cliente deve rolar o item no modo de exibição (ou expandir o controle para mostrar todas as opções de valiosas) para acessar o conjunto completo de informações do item de dados.
When calling SetFocus on the UI Automation element for the data item, the Microsoft Windows Explorer case will return successfully and cause focus to be set to the Edit within the data item subtree.
Required UI Automation Events
The following table lists the UI Automation events required to be supported by all data item controls. For more information about events, see Visão geral sobre eventos de automação de interface do usuário.
UI Automation Event |
Support |
Notes |
---|---|---|
Required |
None |
|
BoundingRectangleProperty property-changed event. |
Required |
None |
IsEnabledProperty property-changed event. |
Required |
None |
IsOffscreenProperty property-changed event. |
Required |
None |
NameProperty property-changed event. |
Required |
None |
Required |
None |
|
Depends |
None |
|
ExpandCollapseStateProperty property-changed event. |
Depends |
None |
Required |
None |
|
Required |
None |
|
Required |
None |
|
ToggleStateProperty property-changed event. |
Depends |
None |
ValueProperty property-changed event. |
Depends |
None |
DataItem Control Type Example
A imagem a seguir ilustra um tipo de controle DataItem em um controle de exibição de lista com suporte para obter informações detalhadas para as colunas.
The Control View and the Content View of the UI Automation tree that pertains to the data item control is displayed below. Os padrões de controle para cada elemento de automação são mostrados entre parênteses. O grupo "contoso" também é parte da grade de controle de host de grade de dados.
UI Automation Tree - Control View |
UI Automation Tree - Content View |
---|---|
|
|
Se uma grade representa uma lista de itens selecionáveis, os elementos de interface do usuário correspondentes podem ser expostos com o tipo de controle ListItem em vez do tipo de controle DataItem. No exemplo anterior, os elementos de DataItem ("contas Receivable.doc" e "Contas Payable.doc") em um grupo ("Contoso") pode ser melhorado, expondo-os como tipos de controle ListItem porque desse tipo já suporta o padrão de controle de SelectionItem.
Consulte também
Referência
Conceitos
Visão Geral dos Tipos de Controle de Automação de Interface do Usuário