jhuaraya
jhuaraya

Reputation: 11

communication between mvvm usercontrols in wpf

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)
- viewmodel/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

Upvotes: 1

Views: 813

Answers (1)

Kent Boogaart
Kent Boogaart

Reputation: 178780

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.

Upvotes: 2

Related Questions