WPF: How to attach mouse events to a viewmodel?

后端 未结 6 1996
南笙
南笙 2021-02-04 19:47

I am trying to use the MVVM pattern for the first time. So I have an ItemsControl filled with my viewmodel objects, displayed using DataTemplate\'s; th

6条回答
  •  -上瘾入骨i
    2021-02-04 20:12

    I am using a much more elegant method. I use Prism 2 and datatemplates. So what I have done is this:

    and in the ItemTemplate I just created a button inside!

                            
        

提交回复
热议问题