private async void ShowModalessDialog(IDialogWindow dialog) { await Application.Current.Dispatcher.InvokeAsync(() => { dialog.Show(); }); }
/// <summary> /// Shows the dialog window. /// </summary> /// <param name="dialogWindow">The dialog window to show.</param> /// <param name="isModal">If true; dialog is shown as a modal</param> protected virtual void ShowDialogWindow(IDialogWindow dialogWindow, bool isModal) { if (isModal) { dialogWindow.ShowDialog(); } else { dialogWindow.Show(); } }
public void ShowDialog <T>(IDialogModel model, Action closed = null) where T : IDialogWindow, new() { IDialogWindow dialog = CreateDialog <T>(model, closed); if (model.IsModal) { dialog.ShowDialog(); } else { dialog.Show(); } }
void ShowDialogInternal(string name, IDialogParameters parameters, Action <IDialogResult> callback, bool isModal) { IDialogWindow dialogWindow = CreateDialogWindow(); ConfigureDialogWindowEvents(dialogWindow, callback); ConfigureDialogWindowContent(name, dialogWindow, parameters); if (isModal) { dialogWindow.ShowDialog(); } else { dialogWindow.Show(); } }
void ShowDialogInternal(string name, IDialogParameters parameters, Action <IDialogResult> callback, bool isModal) { IDialogWindow dialogWindow = CreateDialogWindow(); ConfigureDialogWindowEvents(dialogWindow, callback); ConfigureDialogWindowContent(name, dialogWindow, parameters); dialogWindow.Owner = Application.Current.Windows.OfType <Window>().FirstOrDefault(x => x.IsActive); if (isModal) { dialogWindow.ShowDialog(); } else { dialogWindow.Show(); } }
void ShowDialogInternal(string name, IDialogParameters parameters, Action <IDialogResult> callback, bool isModal) { IDialogWindow dialogWindow = CreateDialogWindow(); ConfigureDialogWindowEvents(dialogWindow, callback); ConfigureDialogWindowContent(name, dialogWindow, parameters); // TODO some way to initialize the shell for before showing it (region navigation) if (isModal) { dialogWindow.ShowDialog(); } else { dialogWindow.Show(); } }
void ShowDialogInternal(string name, IDialogParameters parameters, Action <IDialogResult> callback, bool isModal) { DialogWindow = CreateDialogWindow(); ConfigureDialogWindowEvents(DialogWindow, callback); ConfigureDialogWindowContent(name, DialogWindow, parameters); //TODO: remove this InitializeDialogWindow(name, parameters); //TODO: do this //DialogWindow.Initialize(name, parameters); if (isModal) { DialogWindow.ShowDialog(); } else { DialogWindow.Show(); } }
public void Run() { _window.Show(); }