Implementing the UI Automation RangeValue Control Pattern

Note

This documentation is intended for .NET Framework developers who want to use the managed UI Automation classes defined in the System.Windows.Automation namespace. For the latest information about UI Automation, see Windows Automation API: UI Automation.

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.

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.

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

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