ListBox.SelectAll Método

Definición

Selecciona todos los elementos del control ListBox .

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

Ejemplos

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

Comentarios

Advertencia

Solo se debe llamar al método SelectAll cuando la propiedad SelectionMode está establecida en Multiple o Extended. Si se llama a SelectAll cuando SelectionMode es Single, se produce una excepción.

Se aplica a