ModernWPF.Controls.DialogControl.ShowDialogModal C# (CSharp) Method

ShowDialogModal() public method

Shows the dialog on a DialogControlContainer.
container
public ShowDialogModal ( DialogControlContainer container ) : bool?
container DialogControlContainer The container.
return bool?
        public virtual bool? ShowDialogModal(DialogControlContainer container)
        {
            ShowDialog(container);

            while (_isOpen)
            {
                // from http://www.codeproject.com/Articles/36516/WPF-Modal-Dialog
                // HACK: Stop the thread if the application is about to close
                if (this.Dispatcher.HasShutdownStarted ||
                    this.Dispatcher.HasShutdownFinished)
                {
                    break;
                }

                // HACK: Simulate "DoEvents"
                //this.Dispatcher.Invoke(DispatcherPriority.Background, new ThreadStart(delegate { }));
                this.Dispatcher.DoEvents();
                Thread.Sleep(20);
            }

            return DialogResult;
        }

Same methods

DialogControl::ShowDialogModal ( Window window ) : bool?