You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 2, 2021. It is now read-only.
/// Initializes a new instance of the class.
///
public ModernDialog()
{
this.DefaultStyleKey = typeof(ModernDialog);
this.WindowStartupLocation = WindowStartupLocation.CenterOwner;
this.closeCommand = new RelayCommand(o => {
var result = o as MessageBoxResult?;
if (result.HasValue) {
this.messageBoxResult = result.Value;
if (System.Windows.Interop.ComponentDispatcher.IsThreadModal)//**....Here!!!**
{
// sets the Window.DialogResult as well, if windows is called by ShowDialog()
if (result.Value == MessageBoxResult.OK || result.Value == MessageBoxResult.Yes)
{
this.DialogResult = true;
}
else if (result.Value == MessageBoxResult.Cancel || result.Value == MessageBoxResult.No)
{
this.DialogResult = false;
}
else
{
this.DialogResult = null;
}
}
}
Close();
});
this.Buttons = new Button[] { this.CloseButton };
// set the default owner to the app main window (if possible)
if (Application.Current != null && Application.Current.MainWindow != this) {
this.Owner = Application.Current.MainWindow;
}
}`
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
`///
/// Initializes a new instance of the class.
///
public ModernDialog()
{
this.DefaultStyleKey = typeof(ModernDialog);
this.WindowStartupLocation = WindowStartupLocation.CenterOwner;
The text was updated successfully, but these errors were encountered: