Dela via


ISelectionProvider Interface

Definition

Exposes methods and properties to support access by a Microsoft UI Automation client to controls that act as containers for a collection of individual, selectable child items. The children of this element must implement ISelectionItemProvider. Implement ISelectionProvider in order to support the capabilities that an automation client requests with a GetPattern call and PatternInterface.SelectionItem.

public interface class ISelectionProvider
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.Guid(520196042, 47428, 17301, 141, 225, 136, 246, 116, 175, 81, 211)]
struct ISelectionProvider
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.Guid(520196042, 47428, 17301, 141, 225, 136, 246, 116, 175, 81, 211)]
public interface ISelectionProvider
Public Interface ISelectionProvider
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 Selection 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.

ISelectionProvider is implemented by the existing Windows Runtime class SelectorAutomationPeer, which is the base class for ComboBoxAutomationPeer and ListBoxAutomationPeer.

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

Properties

CanSelectMultiple

Gets a value that indicates whether the Microsoft UI Automation provider allows more than one child element to be selected concurrently.

IsSelectionRequired

Gets a value that indicates whether the UI Automation provider requires at least one child element to be selected.

Methods

GetSelection()

Retrieves a UI Automation provider for each child element that is selected.

Applies to

See also