Exemple #1
0
        /// <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);
        }
Exemple #2
0
        protected override void CloseCanceledCallbackCore()
        {
            var dialog = new DialogWindowViewModel {
                Title = "确认关闭",
            };

            this.Dialog(dialog, typeof(MessageDialog));

            if (dialog.DialogResult)
            {
                this.CanClose = true;
                this.InvokeOnUIDispatcher(this.Close);
            }
        }