开发者

communication between mvvm usercontrols in wpf

开发者 https://www.devze.com 2023-02-07 02:46 出处:网络
i\'m new with wpf and i\'m trying to develop using mvvm pattern so i have files like this - view/students_list.xaml(usercontrol)

i'm new with wpf and i'm trying to develop using mvvm pattern so i have files like this

- view/students_list.xaml        (usercontrol)
- view/students_details.xaml     (usercontrol)
- viewm开发者_如何学Codel/students_list_vm.cs  (class)
- viewmodel/students_details.cs  (class)
- window.xaml                    (Main window container)

I wonder know how to comunicate each usercontrols please, could you help me?... thanks


Take a look at the event aggregator pattern. Prism provides a service that you can use to do this, as do other MVVM frameworks like MVVMLite. That said, it's generally the view models communicating with each other - not the views themselves. I assume that's what you meant.

0

精彩评论

暂无评论...
验证码 换一张
取 消