-
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 Works Differently on Windows and Android #6629
Comments
Verified this issue with Visual Studio Enterprise 17.3.0 Preview 1.0 [32427.455.main]. Repro on Android 12, not repro on Windows with above project. |
I think for now the expectation is an opinionated 'default' value. |
Not my preferred fix but I can certainly live with it since I probably have less than a dozen instances to fix. Should I raise some sort of documentation issue to ensure it gets documented as a Xamarin migration note? |
@PureWeen, incidentally, I found the easiest migration in the "background for highlight" case is just to use "transparent" for non-highlighted items since I normally use plain backgrounds anyway. |
We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process. |
Verified this on Visual Studio Enterprise 17.6.0 Preview 4.0. This issue does not repro with below Project: 6629.zip Windows and Android have the same behavior when clicking on each item line. |
Hi @david-maw. We have added the "s/try-latest-version" label to this issue, which indicates that we'd like you to try and reproduce this issue on the latest available public version. This can happen because we think that this issue was fixed in a version that has just been released, or the information provided by you indicates that you might be working with an older version. You can install the latest version by installing the latest Visual Studio (Preview) with the .NET MAUI workload installed. If the issue still persists, please let us know with any additional details and ideally a reproduction project provided through a GitHub repository. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time. |
Yep, looks like it is fixed, thanks. |
Description
I use a VisualStateManager to highlight selected items in a CollectionView. Prior to RC2 it did not work at all on Android so I reported issue #5449. That was fixed so now it works on Android, but differently than Windows.
Steps to Reproduce
MAUIListEntry-VisualState-RC2.zip
Version with bug
Release Candidate 2 (current)
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
Android 11
Did you find any workaround?
Yes, as part of the fix for Issue #5449 @antonfirsov wrote "...note that you have to define a default BackgroundColor for your grid, otherwise VisualStateManager won't be able to determine what color to switch back to after deselection" this is evidently only true for Android and can be painful to do in existing code. So if you can come up with a color to use this is a workaround on Android (it's evidently not required on Windows).
Relevant log output
No response
The text was updated successfully, but these errors were encountered: