async void getMatches() { REST neo = new REST(); var result = neo.getMatches(opt.teamNumber); ObservableCollection<Match> mts = await result; matches.Clear(); foreach (Match m in mts) matches.Add(m); }
public async Task refreshEntries(object sender, EventArgs e) { REST neo = new REST(); Task<ObservableCollection<Match>> result = neo.getMatches(opt.teamNumber); ObservableCollection<Match> st = await result; if (st.Count > 0) { addEntries(st); try { //Device.BeginInvokeOnMainThread(async () => // { matchListView.ScrollTo(matches[scrollTo], ScrollToPosition.Center, false);// HUH? // }); } catch (ArgumentException ex) { Debug.WriteLine(ex.Message); } } }