async Task <List <Account> > PopulateList() { var accountCore = new AccountCore(); _accountList = await accountCore.GetAccounts(); return(_accountList); }
async void RefreshAccounts() { var accountCore = new AccountCore(); List <Account> accounts = await accountCore.GetAccounts(); ObservableCollection <Account> accountList = new ObservableCollection <Account>(); foreach (var item in accounts) { accountList.Add(item); } lstAccounts.ItemsSource = accountList; }
private async void GetAccounts() { var accountCore = new AccountCore(); List <Account> accounts = await accountCore.GetAccounts(); ObservableCollection <Account> accountList = new ObservableCollection <Account>(); foreach (var item in accounts) { accountList.Add(item); } this.BindingContext = accountList; lstAccounts.ItemsSource = accountList; }