Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

WPF-MVVM : communication betweent two ViewModels

$
0
0

I'm just learning WPF and MVVM so my question can seem dumb, but I really need an explanation, ideally in vb.net :), how can I update a property in a ViewModel when a property in another ViewModel changes.

Here is my situation: i have a UserControl. Its datacontext is set to CompanyViewModel. On the usercontrol I have a datagrid bound to the property in CompanyViewModel named CompanyList (ObservableCollection(of CompanyDetailsBase). I have another usercontrol, which resides on the first one. It's a filter with some combos and checkboxes. Its datacontext is set to FilterViewModel. When I change values on the filter I need to update the CompanyList. What is the optimal way to do this? Thank you!


Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>