Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Multiselect ListBox

I'm having trouble in multiple items selection in an ListBox.

I've tried deriving new control from Selector and writing ListBox helper class which did not work (as expected).

The issue with Selector class is, it does not expose SelectedItems and it's hell to bind the property and manipulate it with selection changed event.

The issue with ListBox Helper class is, I'm getting the required data on multiple selection but it never hits the bound property.

Does anybody know a better way to implement multiselect listbox?

Thanks in advance...

like image 396
ni3a Avatar asked Jun 20 '11 13:06

ni3a


1 Answers

The ListBox has multiple selection already implemented. Just change SelectionMode property to Multiple or Extened.

You can use SelectedItems property to get all the selected items afterwards.

like image 117
Adrian Fâciu Avatar answered Oct 08 '22 03:10

Adrian Fâciu