示例#1
0
        public static void Show(string title, string message, WamlDialogOptions dialogOptions = null)
        {
            GetHostWindow();

            var dialog = new MessageDialog(dialogOptions);

            dialog.Message = message;
            dialog.Title   = title;

            DisplayDialog(dialog);
        }
示例#2
0
        public static async Task <DialogResult> ShowAsync(string title, string message, WamlDialogOptions dialogOptions = null)
        {
            TaskCompletionSource = new TaskCompletionSource <DialogResult>();

            GetHostWindow();

            var dialog = new MessageDialog(dialogOptions);

            dialog.Message = message;
            dialog.Title   = title;

            DisplayDialog(dialog);

            return(await TaskCompletionSource.Task);
        }