private void BindListCollectionView() { QueryObject q = new QueryObject(null, new List<SortObject>(), 3, 0); int totalResults = -1; _sourceList = (IList)new Person().Get(q, out totalResults); ListCollectionView lcv = new ListCollectionView(_sourceList); using (IDisposable defer = lcv.DeferRefresh()) { PeopleGrid.ItemsSource = lcv; lcv.SortDescriptions.Add(new SortDescription("Age", ListSortDirection.Descending)); lcv.GroupDescriptions.Add(new PropertyGroupDescription("Country")); } }
private void BindListCollectionView2() { QueryObject q = new QueryObject(null, new List<SortObject>(), 3, 3); int totalResults = -1; _sourceList = (IList)new Person().Get(q, out totalResults); }
public IList<Identity> Get(QueryObject Query) { return _identities; }
public List<Person> Get(QueryObject Query, out int totalResults) { List<Person> people = People.Skip(Query.Offset).Take(Query.PageSize).ToList(); totalResults = 8; return people; }