public void OnItemSelected (object sender, SelectedItemChangedEventArgs e) { if (((ListView)sender).SelectedItem == null) { return; } var service = e.SelectedItem as IService; var characteristicsPage = new CharacteristicList(adapter, device, service); Navigation.PushAsync(characteristicsPage); ((ListView)sender).SelectedItem = null; // clear selection }
public void OnItemSelected(object sender, SelectedItemChangedEventArgs e) { if (((ListView)sender).SelectedItem == null) { return; } var service = e.SelectedItem as IService; var characteristicsPage = new CharacteristicList(adapter, device, service); Navigation.PushAsync(characteristicsPage); ((ListView)sender).SelectedItem = null; // clear selection }
public void OnItemSelected(object sender, SelectedItemChangedEventArgs e) { ListView listView = sender as ListView; if (listView?.SelectedItem == null) { return; } var service = e.SelectedItem as IService; var characteristicsPage = new CharacteristicList(_adapter, _device, service); Navigation.PushAsync(characteristicsPage); listView.SelectedItem = null; // clear selection }