Compartilhar via


Implementando o Padrão de Controle RangeValue 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 IRangeValueProvider, including information about events and properties. Links to additional references are listed at the end of the topic.

The RangeValuePattern control pattern is used to support controls that can be set to a value within a range. 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 IRangeValueProvider
  • Exceptions
  • Tópicos relacionados

Implementation Guidelines and Conventions

When implementing the Range Value control pattern, note the following guidelines and conventions:

  • Controls allow recalibration of their supported properties based upon locale or user preference. An example of this is a thermometer control that can be set to display the temperature in Fahrenheit or Celsius.

  • Controls that have ambiguous range values, such as progress bars or sliders, should have those values normalized.

Example of a Progress Bar Where Value Is of Type Integer and Minimum and Maximum Property Values Are Normalized to 0 and 100, Respectively

Barra de progresso.

Required Members for IRangeValueProvider

Required member

Member type

Notes

IsReadOnlyProperty

Property

None

ValueProperty

Property

None

LargeChangeProperty

Property

None

SmallChangeProperty

Property

None

MaximumProperty

Property

None

MinimumProperty

Property

None

SetValue

Methods

None

This control pattern has no associated events.

Exceptions

Providers must throw the following exceptions.

Exception type

Condition

ArgumentOutOfRangeException

SetValue is called with a value that is either greater than MaximumProperty or less than MinimumProperty.

Consulte também

Tarefas

Support Control Patterns in a UI Automation Provider

Use Caching in UI Automation

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

Visão geral da árvore de automação de interface do usuário