-
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
Setting BackgroundColor to null does not actually changes BackgroundColor #22914
Comments
Hi I'm an AI powered bot that finds similar issues based off the issue title. Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you! Open similar issues:
Closed similar issues:
|
@Jon2G what if you call "ClearValue" vs setting it to null? |
Using ClearValue as suggested by @PureWeen at dotnet/maui#22914 (comment) seems to work fine
@PureWeen calling "ClearValue" instead of setting property to null seems to work, i have updated the reproduction project. |
@PureWeen I'm afraid i find a case where "ClearValue" does not works. If you define a Style for the View without setting a "default" backgroundColor it will fail to clear the value
A simple label Then try to remove gray background with: I have updated the reproduction project. |
As @PureWeen suggested calling "ClearValue" instead of setting property to null seems to work. dotnet/maui#22914 (comment)
@PureWeen What do you recommend we do in the above mentioned case? |
Description
Probably root cause of #19576
Android/iOS
(Windows works fine)
If you set the BackgroundColor to null nothing will happen.
Steps to Reproduce
Simply try to change BackgroundColor of a Page to null by binding or directly
https://github.com/Jon2G/MAUI-BackgroundColorNull/raw/main/Capture.PNG
Link to public reproduction project repository
https://github.com/Jon2G/MAUI-BackgroundColorNull
Version with bug
8.0.40 SR5
Is this a regression from previous behavior?
Yes, this used to work in Xamarin.Forms
Last version that worked well
Unknown/Other
Affected platforms
iOS, Android
Affected platform versions
Android 33,34
Did you find any workaround?
If you set the BackgroundColor to transparent or any other it will work but its not optimal
Relevant log output
No response
The text was updated successfully, but these errors were encountered: