public async void GetItems() { string wordPressQuery = "en.blog.wordpress.com"; WordPressQueryType queryType = WordPressQueryType.Posts; string queryFilterBy = string.Empty; int maxRecordsParam = 20; WordPressOrderBy orderBy = WordPressOrderBy.None; SortDirection sortDirection = SortDirection.Ascending; _wordPressDataProvider = new WordPressDataProvider(); this.Items = new ObservableCollection <object>(); var config = new WordPressDataConfig() { Query = wordPressQuery, QueryType = queryType, FilterBy = queryFilterBy, OrderBy = orderBy, SortDirection = sortDirection }; var items = await _wordPressDataProvider.LoadDataAsync(config, maxRecordsParam); foreach (var item in items) { Items.Add(item); } }
public async void GetItems() { string wordPressQuery = "en.blog.wordpress.com"; WordPressQueryType queryType = WordPressQueryType.Posts; string queryFilterBy = string.Empty; int maxRecordsParam = 20; Items.Clear(); var wordPressDataProvider = new WordPressDataProvider(); var config = new WordPressDataConfig() { Query = wordPressQuery, QueryType = queryType, FilterBy = queryFilterBy }; var items = await wordPressDataProvider.LoadDataAsync(config, maxRecordsParam); foreach (var item in items) { Items.Add(item); } }