/// <summary> /// 在当前窗口中显示对话框。 /// </summary> public bool Dialog(string content, string title) { var dialog = new DialogWindowViewModel { Content = content, Title = title }; this.Dialog(dialog, typeof(MessageDialog)); return(dialog.DialogResult); }
protected override void CloseCanceledCallbackCore() { var dialog = new DialogWindowViewModel { Title = "确认关闭", }; this.Dialog(dialog, typeof(MessageDialog)); if (dialog.DialogResult) { this.CanClose = true; this.InvokeOnUIDispatcher(this.Close); } }