title: Specified cast is not valid on listview item c#
body: <p>I basically have a listview, with this function when i click on a listview-item.</p>
  
  <p>When i run this and click on the item, i get the following display alerts before my app crashes.</p>
  
  <p>DisplayAlert 1, then DisplayAlert 2, then DisplayAlert 1 and right after this one my app crashes. With "Specified cast is not valid".</p>
  
  <p>I dont know why i get the DisplayAlert 1 again, and why this crashes.</p>
  
  <pre><code>public async void OnSelection(object sender, SelectedItemChangedEventArgs e)
      {
          await DisplayAlert("1", "1", "1");
          if (e.SelectedItem == null)
          {
              return; // ItemSelected is called on deselection, which results in SelectedItem being set to null
          }
  
          //((ListView)sender).SelectedItem = null;
  
          await DisplayAlert("2", "2", "2");
          // Cast to zoneviewmodel type
          var selectedZone = (ViewModel.ZoneViewModel)e.SelectedItem; 
  
  
          await DisplayAlert("3", "3", "3");
          // Redirect to login
          await Navigation.PushAsync(new LoginPage(selectedZone.Address));
  
          await DisplayAlert("4", "4", "4");
          // send message containing information to fill loginpage information
          MessagingCenter.Send&lt;MainPage, ViewModel.ZoneViewModel&gt;(this, "loginInfo", selectedZone);
      }
  </code></pre>