CollectionView: Clearing Selection

David Ortinau - Jan 19 '21 - - Dev Community

CollectionView supports single and multiple item selection modes. Sometimes after selecting items, the user may want to clear all selections and start afresh, or you may want to reset after an action has been taken. This is super easy!

You may instead bind the SelectedItems and SelectedItem to your binding context (e.g. ViewModel) and reset the collection there.

Resources:

GitHub logo davidortinau / Xappy

A mobile app to track Xamarin news and explore all the goodness that is .NET for Mobile developers

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .