Implementing the UI Automation MultipleView Control Pattern

 
System_CAPS_ICON_note.jpg 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 IMultipleViewProvider, including information about events and properties. Links to additional references are listed at the end of the topic.

The MultipleViewPattern control pattern is used to support controls that provide, and are able to switch between, multiple representations of the same set of information or child controls.

Examples of controls that can present multiple views include the list view (which can show its contents as thumbnails, tiles, icons, or details), Entity with relative path '../Token/TLA%23tla_xl_md.md' can not be found, for source topic '{"project_id":"3fedad16-eaf1-41a6-8f96-0c1949c68f32","entity_id":"5bf1b248-ffee-48c8-9613-0b134bbe9f6a","entity_type":"Article","locale":"en-US"}'. charts (pie, line, bar, cell value with a formula), Microsoft Word documents (normal, Web layout, print layout, reading layout, outline), Entity with relative path '../Token/TLA%23tla_outlook_md.md' can not be found, for source topic '{"project_id":"3fedad16-eaf1-41a6-8f96-0c1949c68f32","entity_id":"5bf1b248-ffee-48c8-9613-0b134bbe9f6a","entity_type":"Article","locale":"en-US"}'. calendar (year, month, week, day), and Microsoft Windows Media Player skins. The supported views are determined by the control developer and are specific to each control.

When implementing the Multiple View control pattern, note the following guidelines and conventions:

  • IMultipleViewProvider should also be implemented on a container that manages the current view if it is different from a control that provides the current view. For example, Windows Explorer contains a List control for the current folder content while the view for the control is managed from the Windows Explorer application.

  • A control that is able to sort its content is not considered to support multiple views.

  • The collection of views must be identical across instances.

  • View names must be suitable for use in Text to Speech, Braille, and other human-readable applications.

The following properties and methods are required for implementing IMultipleViewProvider.

Required membersMember typeNotes
CurrentViewPropertyNone
GetSupportedViewsMethodNone
GetViewNameMethodNone
SetCurrentViewMethodNone

There are no events associated with this control pattern.

Provider must throw the following exceptions.

Exception typeCondition
ArgumentExceptionWhen either SetCurrentView or GetViewName is called with a parameter that is not a member of the supported views collection.

UI Automation Control Patterns Overview
Support Control Patterns in a UI Automation Provider
UI Automation Control Patterns for Clients
UI Automation Tree Overview
Use Caching in UI Automation

Show: