public NavigateToProductFinderCmd(IDialogVM productFinder) { _productFinder = productFinder; DisplayName = "Product Search"; DoCanExecuteCheck = () => true; DoExecute = o => Navigate(); }
public SubmitDialogCmd(IDialogVM dialog) { DisplayName = "Submit"; DoExecute += o => { dialog.Submit(); dialog.CloseCmd.Execute(null); }; }
public void OpenDialog(IDialogVM ws) { var dialogPresenter = Application.Current.MainWindow as IDialogPresenter; if (dialogPresenter != null) { dialogPresenter.ShowModalDialog(ws); } }
public DialogWindow(Window parent, IDialogVM ws) { Resources = parent.Resources; ws.CloseCmd = CloseCommand = new CloseCommandVM(Close); DataContext = this; InitializeComponent(); Owner = parent; Width = 500; Height = 500; WindowStyle = WindowStyle.None; ShowInTaskbar = false; WindowStartupLocation = WindowStartupLocation.CenterOwner; ResizeMode = ResizeMode.NoResize; ContentControl.Content = ws; }
public void ShowAsynchModalDialog(IDialogVM ws) { var w = new DialogWindow(this, ws); w.Show(); }