Udostępnij za pośrednictwem


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 AutomationPeer.GetPattern call and PatternInterface.SelectionItem.

public interface class ISelectionItemProvider
/// [Windows.Foundation.Metadata.ContractVersion(Microsoft.UI.Xaml.WinUIContract, 65536)]
/// [Windows.Foundation.Metadata.Guid(3386891649, 54444, 23857, 190, 127, 36, 250, 177, 96, 96, 228)]
struct ISelectionItemProvider
[Windows.Foundation.Metadata.ContractVersion(typeof(Microsoft.UI.Xaml.WinUIContract), 65536)]
[Windows.Foundation.Metadata.Guid(3386891649, 54444, 23857, 190, 127, 36, 250, 177, 96, 96, 228)]
public interface ISelectionItemProvider
Public Interface ISelectionItemProvider
Derived
Attributes

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 AutomationPeer.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