Share via


XamlListItem.Select Method

Selects the list item in the list or combobox.

Namespace:  Microsoft.VisualStudio.TestTools.UITesting.WindowsRuntimeControls
Assembly:  Microsoft.VisualStudio.TestTools.WindowsStore.UITesting (in Microsoft.VisualStudio.TestTools.WindowsStore.UITesting.dll)

Syntax

'Declaration
Public Overridable Sub Select
public virtual void Select()
public:
virtual void Select()
abstract Select : unit -> unit  
override Select : unit -> unit
public function Select()

Exceptions

Exception Condition
InvalidOperationException

The list item is not part of a list or a combo box control.

Remarks

Example - Selects the list item in the list. This is same as myList.SelectedItems = new string[] { myListItem.Name }; myListItem.Select(); Respects the instance search property used when items having the same name, like data bound list items.

.NET Framework Security

See Also

Reference

XamlListItem Class

Microsoft.VisualStudio.TestTools.UITesting.WindowsRuntimeControls Namespace