Skip to content

VisualState Setters not working properly on Windows for a CollectionView #27086

@KeithBoynton

Description

@KeithBoynton

Description

This is a re-opening of #22104 I'm not sure why it was closed because it is still broken in .NET 9 and still broken in .NET 10. I've updated the reproduction project to .net 10 with the latest controls package and it still displays the incorrect behaviour on Windows.

The visual states are not functioning correctly when inside at a CollectionView's DataTemplate on Windows.

If VisualState setters are defined then firstly the elements are not displayed correctly on initial render and then the visual state isn't changed when an item is selected.

This happens only on Windows, it is working correctly on iOS, MacCatalyst and Android.

Android

Image

Windows

Image

Steps to Reproduce

  1. Clone the attached project
  2. Run the solution on MacCatalyst
  3. Observe the Items are initially rendered correctly
  4. Click the Select Next button and observe the items being selected correctly with a Red background
  5. Do the same on iOS and observe it working correctly
  6. Do the same on Android and observe it working correctly
  7. Run the solution on Windows
  8. Observe the items not getting rendered correctly initially and also not when items are selected

Link to public reproduction project repository

https://bitbucket.org/KeithBoynton/collection-view-selection-highlight/src/master/

Version with bug

10.0.30

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

Windows

Affected platform versions

Windows

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