So basically I have three viewmodels. One is the ShellViewModel in which all the data is stored and calculated in real time. And two other viewmodels that show the calculations in different ways. These two VMs are shown as views inside the shell view (via caliburn container and ActiveItem binded with ContentControl). In order to get the data to the other VMs I bind their properties to the properties of the shell VM by sending them in the constructor of the second VM.
VM = new ViewModelA(_PropertyOfShellVM);
//---
ViewModelA(PropertyOfShellVM p)
{
VMProp = p;
}
The properties are classes from a dll with no Notify functions. As a reference type the classes in the VMs are the same. In the other VMs I bind to those classes properties.
class PropertyOfShellVM
{
bool PropertyA{get;set;}
int PropertyB{get;set;}
}
<CheckBox Content="PropA" IsChecked="{Binding VMProp.PropertyA}"/>
<Slider Value="{Binding VMProp.PropB}"/>
Thing is that these classes change very often and need to constantly update. But when use Caliburn's NotifyOfPropertyChange(()=>VMProp) the UI doesn't update.I tried writing the Notify in the properties getter but with no effect. I also tried rebinding the VM properties on custom events, which I sent on new results via the Caliburn's Event Manager, but it's way too slow (I have these values changing multiple times per second, but the events update the UI only about once per 3 seconds). How can the Notify be fixed?
Fixed the problem by using the VMs Refresh() method which forces all the properties of the VM to refresh on the UI. That is a rather rough decision in terms of good practice but it's decently fast enough and works. Won't mark this as an answer yet because there is probably a better solution to this.