Compartilhar via


Suporte de Automação de Interface de Usuário para o Tipo de Controle ToolTip

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 dica de ferramenta 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.

Tool tip controls are pop-up windows that contain text.

The following sections define the required UI Automation tree structure, properties, control patterns, and events for the ToolTip control type. O UI Automation requisitos se aplicam a todos os controles de dica de ferramenta, 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
  • Required UI Automation Events
  • Tópicos relacionados

Required UI Automation Tree Structure

A tabela a seguir ilustra o modo de exibição do controle e o a exibir conteúdo da UI Automation árvore que diz respeito aos controles de dica de ferramenta e descreve o que pode estar contido em cada exibição. For more information on the UI Automation tree, see Visão geral da árvore de automação de interface do usuário.

Control View

Content View

ToolTip

  • Text (0 or more)

  • Image (0 or more)

ToolTip

Controles de dica de ferramenta apareçam somente no modo de exibição de conteúdo do UI Automation árvore se eles podem receber o foco do teclado. Caso contrário, todas as informações da dica de ferramenta está disponível na HelpTextProperty sobre o UI Automation elemento que a dica de ferramenta está se referindo a.

Tool tips should appear beneath the control that their information is referring to. Clients must listen for the ToolTipOpenedEvent to ensure that they consistently obtain information contained in tool tips.

Required UI Automation Properties

The following table lists the UI Automation properties whose value or definition is especially relevant to tool tip controls. 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 clickable point should be the part of the tool tip that will dismiss the control. Some tool tips do not have this ability and will not have a clickable point.

IsKeyboardFocusableProperty

See notes.

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

NameProperty

See notes.

The name of the tool tip control is the text that is displayed within the tool tip.

LabeledByProperty

Null

Tool tip controls are always self-labeled by their contents.

ControlTypeProperty

ToolTip

This value is the same for all UI frameworks.

LocalizedControlTypeProperty

"tool tip"

Localized string corresponding to the ToolTip control type.

IsContentElementProperty

Depends

If the tool tip control can receive keyboard focus, it must be in the Content View of the tree. If it is text only, then it is available as the HelpTextProperty from the control that raised it.

IsControlElementProperty

True

The tool tip control must always be a control.

Required UI Automation Control Patterns

The following table lists the UI Automation control patterns required to be supported by tool tip controls. For more information on 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

IWindowProvider

Depends

Tool tips that can be closed by clicking a UI item must support WindowPattern so that they can closed automatically.

ITextProvider

Depends

Para melhor acessibilidade, um controle de dica de ferramenta pode suportar o padrão de controle de texto, embora não seja obrigatório. O padrão de controle de texto é útil quando o texto tem o estilo sofisticado e atributos (por exemplo, cor, negrito e itálico).

Required UI Automation Events

Tool tip controls must raise the ToolTipOpenedEvent when they appear on the screen. The event will include a reference to the UI Automation element of the tool tip itself.

The following table lists the UI Automation events required to be supported by all tool tip 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

TextSelectionChangedEvent

Depends

None

TextChangedEvent

Depends

None

WindowClosedEvent

Depends

None

WindowOpenedEvent

Depends

None

ToolTipOpenedEvent

Required

None

ToolTipClosedEvent

Required

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

WindowVisualStateProperty property-changed event.

Depends

None

AutomationFocusChangedEvent

Required

None

StructureChangedEvent

Required

None

Consulte também

Referência

ToolTip

Conceitos

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

UI Automation Overview