Skip to content

CollectionView Selected state does not work on the selected item when combined with PointerOver. #29484

@DanTravison

Description

@DanTravison

Description

This is a repro of issue #19708 that was closed due to being stale.

I am also encountering this issue and have created a sample app with the repro.

I've confirmed that this is an issue on 9.0.14, 9.0.50 and 9.0.70 on Windows. I have not tested it on other platforms.

Steps to Reproduce

Create a Maui App.
Define a CollectionView on the main page.
Set ItemsSource to a DataTemplate containing a label whose style declares both PointerOver and Selected visual states.
In each visual state, set BackgroundColor.
Set the ItemsSource to a simple list of strings.

Run the app and notice the PointerOver color BackgroundColor is honored but the Selected BackgroundColor is ignored.

Link to public reproduction project repository

https://github.com/DanTravison/CollectionViewVisualStates

Version with bug

9.0.70 SR7

Is this a regression from previous behavior?

No, this is something new

Last version that worked well

Unknown/Other

Affected platforms

Windows

Affected platform versions

Windows 11 with .Net 9.0.

Did you find any workaround?

No.

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-controls-collectionviewCollectionView, CarouselView, IndicatorViewpartner/syncfusionIssues / PR's with Syncfusion collaborationplatform/windowss/triagedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't working

    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