I have a TabControl and users controls are in TabItem content like that:
\\...
<TabItem.Content>
<vm:myUserControl />
</TabItem.Content>
\\...
<TabItem.Content>
<vm:otherUserControl/>
</TabItem.Content>
How can I update myUserControl when I change data in otherUserControl (example add element in list who must be showed in myUserControl) . This controls have different datacontext (from different viem model class, who inherits BaseViewModel. who impelments INotifyPropertyChanged). Data is provided by WCF client service. Thank you for help.
you can use a Mediator/Messenger or EventAggregator. so your otherUsercontrol raise the message/event and your myUserControl subscribe and react to this message/event.
or if you dont want loose coupling you could of course couple your two viewmodels direct and use some event.