private async void AppBarButton_Click(object sender, RoutedEventArgs e) { try { FavoriteListViewModel.FavoriteList = await ExFavoriteList.DownloadFavoritesAsync(1); } catch (Exception ex) { await new MessageDialog(ex.Message, "AppBarButton_Click").ShowAsync(); } }
private async void UserControl_Loaded(object sender, RoutedEventArgs e) { if (isFirstLoad) { isFirstLoad = false; try { // Get page html FavoriteListViewModel.FavoriteList = await ExFavoriteList.DownloadFavoritesAsync(1); //return await client.GetStringAsync(uri); } catch (Exception ex) { } } }
public async Task UpdateFavoriteListAsync() { FavoriteList = await ExFavoriteList.DownloadFavoritesAsync(1, FavoriteSortingModeSelectedIndex == 1?ExFavoriteSortingMode.Published : ExFavoriteSortingMode.Favorited); }