public bool Show(string content, string caption, bool ShowCancel = false) { Caption = caption; Content = content; ShowOkButton = true; ShowCancelButton = ShowCancel; OkIsCancel = !ShowCancelButton; var dialog = new MessageBoxView(this).ShowDialog(); if (dialog.HasValue) { return(dialog.Value); } else { return(false); } }
public bool Show(Window owner, string caption, string content, bool showCancel = false) { Caption = caption; Content = content; ShowOkButton = true; ShowCancelButton = showCancel; OkIsCancel = !ShowCancelButton; var dialog = new MessageBoxView(this) { WindowStartupLocation = WindowStartupLocation.CenterOwner, Owner = owner }.ShowDialog(); if (dialog.HasValue) { return(dialog.Value); } return(false); }