private void CloseButtonDialog() { if (buttonDialog != null) { this.Dispatcher.Invoke((Action)delegate { buttonDialog.Close(); }); buttonDialog = null; } }
private void OpenButtonDialog() { { //MaximizeShell(); this.Dispatcher.Invoke((Action)delegate { this.Activate(); buttonDialog = new ButtonDialog(ShellViewModel.ButtonDialogType); buttonDialog.ShowInTaskbar = false; buttonDialog.Topmost = true; //buttonDialog.Owner = Application.Current.MainWindow; while (!buttonDialog.IsVisible) { buttonDialog.Show(); buttonDialog.Left = (Application.Current.MainWindow.ActualWidth - buttonDialog.Width) / 2; buttonDialog.Top = (Application.Current.MainWindow.ActualHeight - buttonDialog.Height) / 2; } }); } }