-
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
IsVisible binding not showing items again if Shadow is set #15357
Comments
Hi @dan-matthews. We have added the "s/needs-repro" label to this issue, which indicates that we require steps and sample code to reproduce the issue before we can take further action. Please try to create a minimal sample project/solution or code samples which reproduce the issue, ideally as a GitHub repo that we can clone. See more details about creating repros here: https://github.com/dotnet/maui/blob/main/.github/repro.md 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. |
Added a link to a repo. |
Visibility and Opacity settings were not working correctly when the control was inside a container. For the case of visibility, it was only being set for the container when it needed to be set for both the container and the control. For the case of opacity, it was also only being set for the container, which could reduce the opacity of the control as a side effect because it's a value affected by its parent value. In this case, we need to ensure the control has 100% opacity so it applies and uses the correct value to the container. Fixes: #15826 #15357
* [android] Fixed ListView visibility and opacity on Android Visibility and Opacity settings were not working correctly when the control was inside a container. For the case of visibility, it was only being set for the container when it needed to be set for both the container and the control. For the case of opacity, it was also only being set for the container, which could reduce the opacity of the control as a side effect because it's a value affected by its parent value. In this case, we need to ensure the control has 100% opacity so it applies and uses the correct value to the container. Fixes: #15826 #15357 * Added Appium tests for Visibility issues #15826 and #15357 * Added Appium tests for Opacity issues #12211 * Applied PR feedback: Remove added items from Controls.Sample.UITests.csproj
Duplicate of #15826 |
Description
A very, very strange bug! It always works correctly on Windows, but on Android there is a bug. In my app, the IsVisible for a button is set using binding (MVVM). Setting IsVisible false will always hide the button, but setting IsVisible true is NOT showing the button. However, I found that a styling for the Button was causing the issue. Specifically, the setter (in a Styles.xaml file) was as follows:
When the setter is swapped for individual setters, the IsVisible works:
For some reason, the 'nested' style setter for Shadow seems to be affecting the visibility toggle of the element, but only on Android.
Steps to Reproduce
<Setter Property="Shadow"> <Shadow Brush="Black" Offset="4,4" Opacity="0.9" /> </Setter>
Expected: Button becomes visible
Actual: Button stays hidden
Link to public reproduction project repository
(https://github.com/dan-matthews/VisibleTest)
Version with bug
7.0.86
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
Android 11+
Did you find any workaround?
Use individual style setters for Shadow.
Relevant log output
No response
The text was updated successfully, but these errors were encountered: