I have some issue with accessing classes. the issue is as below.
public class A1ViewModel
{
int A1no;
public int A1NO
{
get { return A1no;}
set { A1no=value;
propertychanged("A1NO");
M1()
}
}
public M1()
{
// do some thing
}
}
public class A2ViewModel
{
int A2no;
public int A2NO
{
get { return A2no;}
set { A2no=value;
propertychanged("A2NO");
M2()
}
}
public M2()
{
//do some thing
}
}
public class mainAViewModel()
{
var a1ViewModel = new A1ViewModel();
var a2ViewModel = new A2ViewModel();
}
Here A1ViewModel is viewmodel for one usercontrol and A2ViewModel is viewmodel for another usercontrol. and mainAViewModel is main ViewModel. in mainAViewModel. i have this two(A1,A2) viewmodels. the question is, if any changes happends in A1 viewmodel then i have to update A2 viewmodel property. Please gudie me. how i can achive this. Thanks in advance