Skip to content

Latest commit

 

History

History
41 lines (33 loc) · 929 Bytes

listbox_selectall_1125513670.md

File metadata and controls

41 lines (33 loc) · 929 Bytes
-api-id -api-type
M:Microsoft.UI.Xaml.Controls.ListBox.SelectAll
winrt method

Microsoft.UI.Xaml.Controls.ListBox.SelectAll

-description

Selects all the items in the ListBox control.

-remarks

Warning

The SelectAll method should only be called when the SelectionMode property is set to Multiple or Extended. If SelectAll is called when the SelectionMode is Single, an exception is thrown.

-examples

if (listBox.SelectionMode != SelectionMode.Single)
{
    listBox.SelectAll();
}
if (listBox().SelectionMode() != Windows::UI::Xaml::Controls::SelectionMode::Single)
{
    listBox().SelectAll();
}
if (listBox->SelectionMode != SelectionMode::Single)
{
    listBox->SelectAll();
}

-see-also