Example #1
0
 public static News.NewsInformation AsArticle(this FavoriteInformation favorite)
 {
     return(new News.NewsInformation()
     {
         CreatedDate = favorite.ArticleDate,
         Description = favorite.Description,
         ImageUrl = favorite.ImageUrl,
         Title = favorite.Title,
     });
 }
Example #2
0
        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;
        }
Example #3
0
 public ItemDetailPage(FavoriteInformation currentArticle)
 {
     InitializeComponent();
     this.CurrentArticle = currentArticle.AsArticle();
 }
Example #4
0
 private async void NavigateToDetailAsync(FavoriteInformation article)
 {
     await App.MainNavigation.PushAsync(new Pages.ItemDetailPage(article), true);
 }