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
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