ListBox.SelectAll Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
public:
virtual void SelectAll() = SelectAll;
void SelectAll();
public void SelectAll();
function selectAll()
Public Sub SelectAll ()
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();
}
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.