ArcGISPortalViewer.ViewModel.AppViewModel.ShowDialogAsync C# (CSharp) Method

ShowDialogAsync() public static method

public static ShowDialogAsync ( string message, string title ) : System.Threading.Tasks.Task
message string
title string
return System.Threading.Tasks.Task
        public static async Task ShowDialogAsync(string message, string title)
        {
            // make sure to call MessageDialog.ShowAsync on the ui thread.
            // force this by rescheduling the call using dispatcher.RunAync.
            var dispatcher = CoreApplication.MainView.CoreWindow.Dispatcher;
            await dispatcher.RunAsync(CoreDispatcherPriority.Normal, async () =>
            {
                var dialog = new Windows.UI.Popups.MessageDialog(message, title);
                dialog.Commands.Add(new Windows.UI.Popups.UICommand("Cancel", a => { }));
                await dialog.ShowAsync();
            });
        }