public MainPage() { this.InitializeComponent(); ArticleTheThao = new ObservableCollection <Article>(); ArticleGiaiTri = new ObservableCollection <Article>(); ArticleKinhTe = new ObservableCollection <Article>(); ArticleManager.GetArticleByCategory(ArticleTheThao, NewsCategory.TheThao); ArticleManager.GetArticleByCategory(ArticleGiaiTri, NewsCategory.GiaiTri); ArticleManager.GetArticleByCategory(ArticleKinhTe, NewsCategory.KinhTe); MenuIems = new List <MenuItem>(); MenuIems.Add(new MenuItem { ImageFile = "Assets/Images/thethao/1.jpg", Category = NewsCategory.TheThao }); MenuIems.Add(new MenuItem { ImageFile = "Assets/Images/thethao/2.jpg", Category = NewsCategory.TheThao }); MenuIems.Add(new MenuItem { ImageFile = "Assets/Images/thethao/3.jpg", Category = NewsCategory.TheThao }); MenuIems.Add(new MenuItem { ImageFile = "Assets/Images/thethao/4.jpg", Category = NewsCategory.TheThao }); }
public IEnumerable <Article> GetArticleByCategoryList(string username, string category) { var articleList = am.GetArticleByCategory(category); return(articleList); }