public void Client_SelectAllLCompleted(object sender, SelectAllLCompletedEventArgs e) { Device.BeginInvokeOnMainThread( async() => { if (e.Error != null) { await DisplayAlert("An Error", e.Error.ToString(), "Exit"); } else if (e.Cancelled == true) { await DisplayAlert("Event Cancelled", "Cancelled", "Exit"); } else { LocationList l = e.Result as LocationList; if (l == null) { await DisplayAlert("failed to get list", "List is null", "Exit"); } else { lc.ItemsSource = l; } } } ); }
public LocPage() { InitializeComponent(); client.SelectAllLAsync(); l = new LocationList(); client.SelectAllLCompleted += Client_SelectAllLCompleted; }