ISelectionItemProvider.Select Method ()

 

Deselects any selected items and then selects the current element.

Namespace:   System.Windows.Automation.Provider
Assembly:  UIAutomationProvider (in UIAutomationProvider.dll)

void Select()

The following example code clears all items from the collection of selected items and then adds this one.

/// <summary>
/// Selects the item.
/// </summary>
/// <remarks>
/// selectedItems is the collection of selected ListItems.
/// </remarks>
public void Select()
{
    selectedItems.Clear();
    selectedItems.Add(this);
    // TODO: Update UI.
}

.NET Framework
Available since 3.0
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Return to top
Show: