Search code examples
xamarinxamarin.formsuwpcollectionview

How to remove system checkboxes from CollectionView in UWP (Xamarin Forms)


I have no idea how to remove the checkbox that is generated automatically when setting the SelectionMode to Multiple in a CollectionView on Windows. I have a custom checkbox, so i don't need the one that is displayed by default. Maybe someone has any idea?

Here is a black default checkbox and my custom check mark


Solution

  • how to remove the checkbox that is generated automatically when setting the SelectionMode to Multiple

    I'm afraid you can't remove the check box from CollectionView, Because the matched native control in uwp platform is GridView or ListView base on the ItemsLayout property, you could modify the default style to hide the checkbox for listview or gridview item like this case replay. Unfortunately, xamarin CollectionView's native control does not use the default system internal style, and the style comes from WinUI lib. That means we can't edit it with style overriding.

    For the requirement, we suggest you set SelectionMode as single, and use your custom checkbox to cover the default position.