-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VisualStateManager does not seem to work on Android #5449
Comments
Verified repro with Version 17.2.0 Preview 2.0 [32208.484.main] |
There are two issues here:
This is where maui/src/Controls/src/Core/Setter.cs Lines 120 to 121 in de09524
Then in
|
@david-maw this is going to be essentially fixed with #6249 in the next release, but note that you have to define a default Lines 15 to 32 in e79f133
|
Thanks for the fix @antonfirsov I can code around that constraint but it's a pain, there are a few consequences of that design decision that make migration from Xamarin harder, so I've raised Issue #6454 to track them. On the face of it that's an awkward design decision to detect and handle in migrated code, but there's undoubtedly more to it than I know. |
Description
Using a VisualStateManager to highlight selected items in a CollectionView works fine in Windows but not in Android. The sample one I'm using here is:
This should highlight any selected items (if there are any) by drawing their background in yellow.
Steps to Reproduce
Version with bug
Preview 14 (current)
Last version that worked well
Unknown/Other
Affected platforms
Android, I was not able test on other platforms
Affected platform versions
Android 11, Windows 10
Did you find any workaround?
You can code around it for single selections using the SelectionChanged event to explicitly handle changing background color but I've no idea how general that solution is.
Relevant log output
No response
The text was updated successfully, but these errors were encountered: