public partial class MyView : Window
{
private MyViewModel aModel;
public MyView()
{
InitializeComponent();
aModel = new MyViewModel();
this.DataContext = aModel();
}
The view will now change its control data bindings associated with the public properties of the ViewModel.
Billg source
share