ISelectionItemProvider ISelectionItemProvider ISelectionItemProvider Interface

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(PatternInterface) call and PatternInterface.

Syntax

Declaration

public interface ISelectionItemProviderpublic interface ISelectionItemProviderPublic Interface ISelectionItemProvider

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(AutomationProperty, Object, Object).

Properties summary

Gets a value that indicates whether an item is selected.

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

Methods summary

Adds the current element to the collection of selected items.

Removes the current element from the collection of selected items.

Clears any existing selection and then selects the current element.

Properties

  • IsSelected
    IsSelected
    IsSelected
    IsSelected

    Gets a value that indicates whether an item is selected.

    public bool IsSelected { get; }public bool IsSelected { get; }Public ReadOnly Property IsSelected As boolpublic bool IsSelected { get; }

    Property Value

    • bool
      bool
      bool

      true if the element is selected; otherwise, false.

  • SelectionContainer
    SelectionContainer
    SelectionContainer
    SelectionContainer

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

    public IRawElementProviderSimple SelectionContainer { get; }public IRawElementProviderSimple SelectionContainer { get; }Public ReadOnly Property SelectionContainer As IRawElementProviderSimplepublic IRawElementProviderSimple SelectionContainer { get; }

    Property Value

Methods

  • AddToSelection()
    AddToSelection()
    AddToSelection()
    AddToSelection()

    Adds the current element to the collection of selected items.

    public void AddToSelection()public void AddToSelection()Public Function AddToSelection() As voidpublic void AddToSelection()
  • RemoveFromSelection()
    RemoveFromSelection()
    RemoveFromSelection()
    RemoveFromSelection()

    Removes the current element from the collection of selected items.

    public void RemoveFromSelection()public void RemoveFromSelection()Public Function RemoveFromSelection() As voidpublic void RemoveFromSelection()
  • Select()
    Select()
    Select()
    Select()

    Clears any existing selection and then selects the current element.

    public void Select()public void Select()Public Function Select() As voidpublic void Select()

Device family

Windows 10 (introduced v10.0.10240.0)

API contract

Windows.Foundation.UniversalApiContract (introduced v1)

Attributes

Windows.Foundation.Metadata.ContractVersionAttribute
Windows.Foundation.Metadata.GuidAttribute
Windows.Foundation.Metadata.WebHostHiddenAttribute

Details

Assembly

Windows.UI.Xaml.Automation.Provider.dll