private async Task LoadData() { var items = await repository.GetItems(); if (!ShowAll) { items = items.Where(x => x.Completed == false).ToList(); } var itemViewModels = items.Select(i => CreateToDoItemViewModel(i)); Items = new ObservableCollection <ToDoItemViewModel>(itemViewModels); }