public static async Task <List <MusicPlaybackItem> > AddFailedFilePath( List <Tuple <StorageFile, string> > failedItems) { if (Current != null) { Current.Hide(); } var source = new TaskCompletionSource <List <MusicPlaybackItem> >(); await Windows.ApplicationModel.Core .CoreApplication.MainView.CoreWindow .Dispatcher.RunAsync( Windows.UI.Core.CoreDispatcherPriority.Normal, async() => { var dialog = new FileOpenFailure(failedItems); await dialog.ShowAsync(); source.SetResult(dialog.Added); }); return(await source.Task); }
private void OnOpened(ContentDialog sender, ContentDialogOpenedEventArgs args) { Current = this; }
private void OnClosed(ContentDialog sender, ContentDialogClosedEventArgs args) { Current = null; }