Compartilhar via


Suporte à Automação de IU para o tipo de controle Image

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 UI Automation suporte para a imagem o tipo de controle. In UI Automation, a control type is a set of conditions that a control must meet in order to use the ControlTypeProperty property. As condições incluem as diretrizes específicas para UI Automation estrutura de árvore, UI Automation os valores de propriedade e padrões de controle.

Image controls used as icons, informational graphics, and charts will support the Image control type. Os controles usados como plano de fundo ou imagens de marca d'água não suportará o tipo de controle de imagem.

The following sections define the required UI Automation tree structure, properties, control patterns, and events for the Image control type. The UI Automation requirements apply to all image controls, whether Windows Presentation Foundation (WPF), Win32, or 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
  • Required UI Automation Events
  • 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 image 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.

Control View

Content View

Image

Imagem (depende se a imagem contém informações (com base no valor de IsContentElement propriedade))

Required UI Automation Properties

The following table lists the UI Automation properties whose value or definition is especially relevant to the Image control type. For more information about UI Automation properties, see UI Automation Properties for Clients.

UI Automation Property

Value

Notes

AutomationIdProperty

See notes.

The value of this property needs to be unique across all controls in an application.

BoundingRectangleProperty

See notes.

The outermost rectangle that contains the whole control.

ClickablePointProperty

See notes.

The image control’s clickable point must be a point within the bounding rectangle of the image control.

IsKeyboardFocusableProperty

See notes.

If the control can receive keyboard focus, it must support this property.

NameProperty

See notes.

The Name property must be exposed for all image controls that contain information. Programmatic access to this information requires that a textual equivalent to the graphic be provided. If the image control is purely decorative, it must only show up in the control view of the UI Automation tree and is not required to have a name. UI frameworks must support an ALT or alternate text property on images that can be set from within their framework. This property will then map to the UI Automation Name property.

LabeledByProperty

See notes.

If there is a static text label then this property must expose a reference to that control.

ControlTypeProperty

Image

This value is the same for all UI frameworks.

LocalizedControlTypeProperty

"image"

Localized string corresponding to the Image control type.

IsContentElementProperty

See notes.

The image control must be included in the content view of the UI Automation tree when it contains meaningful information not already exposed to the end user.

IsControlElementProperty

True

The image control is always included in the control view of the UI Automation tree.

HelpTextProperty

See notes.

A propriedade HelpText expõe uma seqüência localizada que descreve a aparência visual real do controle (por exemplo, um quadrado vermelho com um 'X' em branco) ou outras informações de dica de ferramenta associado à imagem.

This property must be supported when a long description is needed to convey more information about the image control. For example, a complicated chart or diagram. Esta propriedade é mapeado para as marcas HTML LongDesc e o Scalable Vector Graphics (SVG) Desc. Developers working with image controls must support a property to allow the visual description to be set on the control. Esta propriedade deve ser mapeada para a propriedade VisualDescription de automação da interface do usuário.

ItemStatusProperty

See notes.

If the image control represents state information about a particular item on the screen, the control should be contained within the item. When the image is contained within an item the item must support the status property and raise appropriate notifications when the status changes.

If an image is a standalone control and is conveying status this property must be supported.

Required UI Automation Control Patterns

The following table lists the UI Automation control patterns required to be supported by all image 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

IGridItemProvider

Depends

The image control supports the Grid Item pattern if the control is within a grid container.

ITableItemProvider

Depends

The image control supports the Table Item pattern if the control is within a container that has header controls.

IInvokeProvider

Never

If the image control contains a clickable image, the control should support a control type that supports the Invoke pattern, such as the Button control type.

ISelectionItemProvider

Never

Image controls should not support the Selection Item pattern.

Required UI Automation Events

The following table lists the UI Automation events required to be supported by all image controls. For more information on events, see Visão geral sobre eventos de automação de interface do usuário.

UI Automation Event

Support

Notes

InvokedEvent

Never

None

ElementAddedToSelectionEvent

Never

None

ElementRemovedFromSelectionEvent

Never

None

ElementSelectedEvent

Never

None

BoundingRectangleProperty property-changed event.

Required

None

IsOffscreenProperty property-changed event.

Required

None

IsEnabledProperty property-changed event.

Required

None

NameProperty property-changed event.

Required

None

AutomationFocusChangedEvent

Required

None

StructureChangedEvent

Required

None

Consulte também

Referência

Image

Conceitos

Visão Geral dos Tipos de Controle de Automação de Interface do Usuário

UI Automation Overview