private async void 全部_Clicked(object sender, EventArgs e) { TrainingDatabase itemDataBase = TrainingDatabase.getDatabase(); List <Training> itemList = await itemDataBase.GetItemsAsync(); listView.ItemsSource = itemList; }
protected override async void OnAppearing() { TrainingDatabase itemDataBase = TrainingDatabase.getDatabase(); List <Training> itemList; itemList = await itemDataBase.GetItemsAsync(); if (itemList.Count < 1) { await storeInitialData(itemDataBase); itemList = await itemDataBase.GetItemsAsync(); } // ListViewを生成する listView.ItemsSource = itemList; }