public static News.NewsInformation AsArticle(this FavoriteInformation favorite) { return(new News.NewsInformation() { CreatedDate = favorite.ArticleDate, Description = favorite.Description, ImageUrl = favorite.ImageUrl, Title = favorite.Title, }); }
private async void ToggleFavoriteAsync(News.NewsInformation article) { this._isBusy = true; this.RaiseCanExecuteChanged(); App.ViewModel.IsBusy = true; //TODO: Here FavoriteInformation favoriteInformation = await article.AsFavorite("Technology"); await App.ViewModel.Favorites.AddAsync(favoriteInformation); this._isBusy = false; this.RaiseCanExecuteChanged(); App.ViewModel.IsBusy = false; }
public ItemDetailPage(FavoriteInformation currentArticle) { InitializeComponent(); this.CurrentArticle = currentArticle.AsArticle(); }
private async void NavigateToDetailAsync(FavoriteInformation article) { await App.MainNavigation.PushAsync(new Pages.ItemDetailPage(article), true); }