Beispiel #1
0
        private async Task <ObservableCollection <ToDoItem> > LoadIncrementalDataAsync(int count, int pageSize)
        {
            var items = new ObservableCollection <ToDoItem>();

            for (var i = count; i <= count + PageSize; i++)
            {
                items.Add(ToDoItem.GetToDoItem(i));
            }

            return(items);
        }
Beispiel #2
0
        private void LoadToDoItems()
        {
            var items = new List <ToDoItem>();

            for (var i = 1; i <= 20; i++)
            {
                items.Add(ToDoItem.GetToDoItem(i));
            }

            var sorted = from item in items
                         orderby item.FinishBy
                         group item by item.FinishByDisplay into itemGroup
                         select new Grouping <string, ToDoItem>(itemGroup.Key, itemGroup);

            GroupedItems.Clear();
            GroupedItems.AddRange(sorted);
        }