title: how to clear collectionview selection in xamarin
body: <p>On Page#1, i have a collectionview with text/string items list. If you tap a a item, it will get the current tapped text/string and send to Page#2. sound simple</p>
  <p><strong>issue I am having:</strong> if you tap on item#1, then it will send item#1 to page2, this part working fine. But on page#2, if you hit back button, and tap on item#1 again.. than nothing happens, it doesnt go to page#2</p>
  <p><strong>Fix:</strong> i think i need to somehow clear tap selection, and than send the item to page#2. but im not sure how to do this</p>
  <p>On Page#1, i have a simple collectionview. Collection view contains text/string list</p>
  <pre><code>        &lt;CollectionView ItemsSource=&quot;{Binding MyListItem}&quot;
                          SelectionMode=&quot;Single&quot;
                          SelectionChanged=&quot;CollectionView_SelectionChanged&quot;&gt;
              &lt;CollectionView.ItemTemplate&gt;
                  &lt;DataTemplate&gt;
                      &lt;ContentView&gt;
                          &lt;!-- Body --&gt;
                          &lt;Grid Padding=&quot;0&quot;&gt;
                              &lt;Frame CornerRadius=&quot;3&quot; BorderColor=&quot;#f2f4f5&quot; HasShadow=&quot;True&quot;&gt;
                                  &lt;StackLayout Orientation=&quot;Horizontal&quot;&gt;
                                      &lt;Image Source=&quot;icon_about&quot;
                                                 WidthRequest=&quot;25&quot;  /&gt;
                                      &lt;StackLayout VerticalOptions=&quot;Center&quot;&gt;
                                          &lt;Label VerticalOptions=&quot;Center&quot;
                                                      FontSize=&quot;16&quot; 
                                                      Text=&quot;{Binding .}&quot; /&gt;
                                      &lt;/StackLayout&gt;
                                  &lt;/StackLayout&gt;
                              &lt;/Frame&gt;
  </code></pre>
  <p>back end code to handle selection is:</p>
  <pre><code>    private async void CollectionView_SelectionChanged(object sender, SelectionChangedEventArgs e)
      {
          var previous = e.PreviousSelection.FirstOrDefault();
          var current = e.CurrentSelection.FirstOrDefault();
  
          var route = $&quot;{ nameof(Page2) }?URLCardType={current}&quot;;
          await Shell.Current.GoToAsync(route);
          
          //clear selection 
          ((CollectionView)sender).SelectedItem = null;
      }
  </code></pre>
  <p><strong>Update</strong>  <code>((CollectionView)sender).SelectedItem = null;</code> fixed the issue of clearing selected item but <code>CollectionView_SelectionChanged</code> method is get run twice on single tap. why? this is all the code i have</p>