I am developing WPF Application using MVVM light tool kit.I have a datagrid in my Mainwindow.I have created another window named "openfile" and their viewmodels.Main Window viewmodel class contain public property of type ObservableCollection MyList which is bound to the Datagrid.Can I able to fill this property from the openfile Viewmodel and and automatically bind to Datagrid? or can I able to pass a varaible to MainViewmodel and make a Call to a public function in the MainViewmodel from the OpenfileViewmodel?
This is How I am calling MyPage From Menu bar.
private void NotificationMessageReceived(NotificationMessage msg)
{
switch (msg.Notification)
{
case Messages.MainVM_Notofication_ShowNewbWindow:
new NewView().ShowDialog();
break;
case Messages.MainVM_Notofication_ShowExistingWindow:
new OpenExisitingView().ShowDialog();
break;
case Messages.MainVM_Notofication_ShowotherWindow:
newView().ShowDialog();
break;
}
}
Thanks in Advance. Roshil K
OpenFileview?