ListBox.SelectAll メソッド

定義

ListBox コントロール内のすべての項目を選択します。

public:
 virtual void SelectAll() = SelectAll;
void SelectAll();
public void SelectAll();
function selectAll()
Public Sub SelectAll ()

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();
}
If listBox.SelectionMode <> SelectionMode.Single Then
    listBox.SelectAll()
End If

注釈

警告

SelectAll メソッドは、 SelectionMode プロパティが Multiple または Extended に設定されている場合にのみ呼び出 必要があります。 SelectionModeSingle のときに SelectAll が呼び出されると、例外がスローされます。

適用対象