public static async Task <string> AskForAlbum() { var albums = await GetAlbums(); //This looks ugly. var selected = Application.Current.Dispatcher.Invoke(() => Application.Current.Windows[0].Dispatcher.Invoke(() => PickAlbumDialog.OkCancel(albums))); return(selected); }
public static async Task <string> AskForAlbum(ImgurPreset preset) { var albums = await GetAlbums(preset); return(Application.Current.Dispatcher.Invoke <string>(() => PickAlbumDialog.OkCancel(albums))); }