SelectionItem Control Pattern

Describes guidelines and conventions for implementing ISelectionItemProvider, including information about properties, methods, and events. The SelectionItem control pattern is used to support controls that act as individual, selectable child items of container controls that implement ISelectionProvider.

For examples of controls that implement this control pattern, see Control Types and Their Supported Control Patterns.

This topic contains the following sections.

Implementation Guidelines and Conventions

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

Required Members for ISelectionItemProvider

The following properties, methods, and events are required for implementing the ISelectionItemProvider interface.

Required members Member type Notes
AddToSelection Method None
IsSelected Property None
RemoveFromSelection Method None
Select Method None
SelectionContainer Property None
UIA_SelectionItem_ElementAddedToSelectionEventId Event None
UIA_SelectionItem_ElementRemovedFromSelectionEventId Event None
UIA_SelectionItem_ElementSelectedEventId Event None

 

If the result of a Select, an AddToSelection, or a RemoveFromSelection is a single selected item, an ElementSelected event (UIA_SelectionItem_ElementSelectedEventId) should be raised; otherwise raise ElementAddedToSelection (UIA_SelectionItem_ElementAddedToSelectionEventId) or ElementRemovedFromSelection (UIA_SelectionItem_ElementRemovedFromSelectionEventId) events as appropriate.

Control Types and Their Supported Control Patterns

UI Automation Control Patterns Overview

UI Automation Tree Overview