How to bind multiple selection of listview to viewmodel?

后端 未结 9 2162
刺人心
刺人心 2020-12-13 09:14

I am implementing a listview, and a button next to it. I have to be able that when i select multiple items in a listview, and then click on a button, then the selected items

9条回答
  •  半阙折子戏
    2020-12-13 09:41

    It's kind of tricky to do this Mutliple Selection in MVVM, because the SelectedItems property isn't a Dependency Property. However, there are some tricks you can use. I found this triology of blog posts that describe the matter in some details and provide some useful solutions.

    • Part I
    • Part II
    • Part III

    Hope this helps

提交回复
热议问题