private async void ShowModalessDialog(IDialogWindow dialog)
 {
     await Application.Current.Dispatcher.InvokeAsync(() =>
     {
         dialog.Show();
     });
 }
예제 #2
0
 /// <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();
            }
        }
예제 #4
0
        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();
            }
        }
예제 #5
0
        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();
            }
        }
예제 #6
0
        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();
            }
        }
예제 #8
0
 public void Run()
 {
     _window.Show();
 }