Binding SelectedItems of Listview

后端 未结 2 1880
萌比男神i
萌比男神i 2020-12-07 05:11

how can i bind SelectedItems of a ListView? My ListView has multipleSelection attribute and I\'m using CollectionVi

相关标签:
2条回答
  • 2020-12-07 05:37

    May be you should add the IsSelected property to the ListViewItem's view model.

    0 讨论(0)
  • 2020-12-07 05:49

    You will have to use your own code to keep the selected items after a refresh. Maybe make a copy of your collection before the refresh and afterwards a simple for to check all the checked items in your current collection.

    Change your selectection mode to extended for your listbox for the shift key to work.

    As for manipulating logically the selected items, you will have to give a lot more info on what exactly you want done.

    0 讨论(0)
提交回复
热议问题