Delen via


ISelectionItemProvider Interface

Definition

Exposes methods and properties to support access by a Microsoft UI Automation client to individual, selectable child controls of containers that implement ISelectionProvider. Implement this interface in order to support the capabilities that an automation client requests with a GetPattern call and PatternInterface.SelectionItem.

public interface class ISelectionItemProvider
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.Guid(1783199681, 33549, 17106, 191, 98, 4, 46, 189, 222, 204, 25)]
struct ISelectionItemProvider
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.Guid(1783199681, 33549, 17106, 191, 98, 4, 46, 189, 222, 204, 25)]
public interface ISelectionItemProvider
Public Interface ISelectionItemProvider
Derived
Attributes

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Remarks

This pattern has guidelines and conventions that aren't fully documented here. For more info on what this pattern is for, see SelectionItem Control Pattern. However, you don't need to follow the guidance regarding IRawElementProviderFragmentRoot, that is specific to COM provider implementations and the interface doesn't exist in the Windows Runtime automation provider API.

ISelectionItemProvider is implemented by these existing Windows Runtime classes:

Use SelectionItemPatternIdentifiers if you want to reference the ISelectionItemProvider pattern properties from control code when you fire automation events or call RaisePropertyChangedEvent.

Properties

IsSelected

Gets a value that indicates whether an item is selected.

SelectionContainer

Gets the UI Automation provider that implements ISelectionProvider and acts as the container for the calling object.

Methods

AddToSelection()

Adds the current element to the collection of selected items.

RemoveFromSelection()

Removes the current element from the collection of selected items.

Select()

Clears any existing selection and then selects the current element.

Applies to

See also