Can I select all items in WPF Listbox through XAML only?
I followed this question as well WPF Listbox and Select All but it's not working. My XAML code as follows:
<ListBox SelectionMode="Multiple" Name="listBox">
<ListBox.InputBindings>
<KeyBinding Command="ApplicationCommands.SelectAll" Modifiers="Ctrl" Key="A" />
</ListBox.InputBindings>
<ListBox.CommandBindings>
<CommandBinding Command="ApplicationCommands.SelectAll" />
</ListBox.CommandBindings>
<ListBoxItem>List Item 1</ListBoxItem>
<ListBoxItem>List Item 2</ListBoxItem>
<ListBoxItem>List Item 3</ListBoxItem>
<ListBoxItem>List Item 4</ListBoxItem>
<ListBoxItem>List Item 5</ListBoxItem>
</ListBox>
Is Select all possible through XAMl only?