Freigeben über


Implementing the UI Automation RangeValue Control Pattern

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 Control Pattern Mapping for UI Automation Clients.

This topic contains the following sections.

  • Implementation Guidelines and Conventions
  • Required Members for IRangeValueProvider
  • Exceptions
  • Related Topics

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

Progress bar.

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.

See Also

Tasks

Support Control Patterns in a UI Automation Provider
Use Caching in UI Automation

Concepts

UI Automation Control Patterns Overview
UI Automation Control Patterns for Clients
UI Automation Tree Overview