protected async override void OnAppearing() { base.OnAppearing(); MyListView.ItemsSource = await MaterialDA.GetAvailableMaterialsById(CollectorViewModel.Collector.MaterialCollection); addedMaterialList.ItemsSource = await MaterialDA.GetMaterialsById(CollectorViewModel.Collector.MaterialCollection); }
private async void GetAvailableMaterials() { MaterialList = await MaterialDA.GetMaterialsById(CollectorViewModel.Collector.MaterialCollection); AvailableMaterialList = await MaterialDA.GetAvailableMaterialsById(CollectorViewModel.Collector.MaterialCollection); if (MaterialList != null) { MaterialCount = MaterialList.Count; } else { MaterialCount = 0; MaterialList = new ObservableCollection <Material>(); } }