Skip to content

[WinUI][CollectionView2] Selection Appearance Differs from CV1 #34747

@SuthiYuvaraj

Description

@SuthiYuvaraj

Description

The selection UI in the CollectionView2 implementation differs from CV1. In the updated version, the selected item is highlighted using a border that fully wraps the item, whereas in CV1 a different visual style was used for selection

Steps to Reproduce

Single Selection

  1. Run the attached sample
  2. Ensure the selection mode is set to Single
  3. Select any item in the CollectionView
  4. Observe the selection appearance

Expected Behavior:
The selection UI should match the CV1 behavior. The selected item should display the selection color along with a small indicator on the left side, instead of a full border wrapping the item.

Actual Behavior:
The selected item is displayed with a full border around it, resulting in a different look and feel compared to CV1.

CV1 Behavior CV2 Behavior
Before Fix After Fix

** Multiple Selection**

  1. Run the attached sample
  2. Ensure the selection mode is set to Multiple
  3. Select multiple items in the CollectionView
  4. Observe the selection appearance for all selected items

Expected Behavior
The selection UI should match the CV1 behavior. In CV1, the checkbox is positioned on the left side of the item. However, in the current implementation, The border is wrapped over the item and checkbox are displayed on the right side. The checkbox should be aligned to the left as in CV1 for consistency.

Actual Behavior
In the current implementation, the selected item is highlighted with a full border wrapping the item. Additionally, the checkbox is positioned on the right side instead of the left, which differs from the CV1 behavior.

CV1 Behavior CV2 Behavior
Before Fix - Multi Select After Fix - Multi Select

Link to public reproduction project repository

https://github.com/SuthiYuvaraj/Samples/tree/main/CollectionView2WinUI/TestSampleSelection

Version with bug

11.0.0-preview2

Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

Last version that worked well

Unknown/Other

Affected platforms

Windows

Affected platform versions

Windows

Did you find any workaround?

No response

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions