public Notification(ICommonBl bl, MainAdminViewModel mainAdminViewModel) { InitializeComponent(); _bl = bl; _mainAdminViewModel = mainAdminViewModel; _viewModel = new NotificationViewModel(_bl, _mainAdminViewModel); App.AddViewModel("NotificationViewModel", _viewModel); grdMain.DataContext = _viewModel; }
public void DoSendNotification() { NotificationViewModel viewModel = App.ViewModel["NotificationViewModel"] as NotificationViewModel; viewModel.SendNotification(); }