public static Task <ContentDialogResult> ShowAsync(FormattedText message, string title = null, string primary = null, string secondary = null) { var dialog = new MessagePopup(); dialog.Title = title; dialog.FormattedMessage = message; dialog.PrimaryButtonText = primary ?? string.Empty; dialog.SecondaryButtonText = secondary ?? string.Empty; return(dialog.ShowQueuedAsync()); }
private void OnMediaFailed(MediaPlaybackSession sender, MediaPlayerFailedEventArgs args) { if (args.Error != MediaPlayerError.SourceNotSupported) { return; } this.BeginOnUIThread(async() => { var confirm = await MessagePopup.ShowAsync("In order to play voice messages you must install Web Media Extensions from the Microsoft Store.", Strings.Resources.AppName, Strings.Resources.OK, Strings.Resources.Cancel); if (confirm != ContentDialogResult.Primary) { return; } await Launcher.LaunchUriAsync(new Uri("ms-windows-store://pdp/?PFN=Microsoft.WebMediaExtensions_8wekyb3d8bbwe")); }); }