Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

How to properly deselect ListView item on iOS?

$
0
0

I tried to deselect ListView item by setting SelectedItem = null. When I did that list item is deselected. However, the ListView keep scrolling to the top of the list. Is there a better way to deselect ListView item?

list.ItemSelected += (sender, e) => {
    if(list.SelectedItem == null)
        return;
    //deselect item when pushing
    list.SelectedItem = null;
};

Viewing all articles
Browse latest Browse all 58056

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>