private async Task LoadData(string sortBy) { LoaderState.ToBusy(); SortOnCode = sortBy == "Code"; SortOnGenus = sortBy == "Genus"; OnPropertyChanged(nameof(SortOnCode)); OnPropertyChanged(nameof(SortOnGenus)); var items = await _viewProvider.GetCollectionItemsAsync(sortBy); CollectionItems.Clear(); foreach (var item in items) { CollectionItems.Add(new CollectionItemViewModel(item)); } LoaderState.ToIdle(); }