Skip to content
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

Open
Jon2G opened this issue Jun 7, 2024 · 1 comment · May be fixed by #22917
Open

Setting BackgroundColor to null does not actually changes BackgroundColor #22914

Jon2G opened this issue Jun 7, 2024 · 1 comment · May be fixed by #22917
Labels
area-controls-general General issues that span multiple controls, or common base classes such as View or Element area-drawing Shapes, Borders, Shadows, Graphics, BoxView, custom drawing platform/android 🤖 platform/iOS 🍎 t/bug Something isn't working
Milestone

Comments

@Jon2G
Copy link
Contributor

Jon2G commented Jun 7, 2024

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

<ContentPage ... BackgroundColor="Gray"> ... </ContentPage>
public partial class MainPage : ContentPage
{
.....
	private void RestoreBackground()
	{
		this.BackgroundColor = null; // Color will remain gray
	}
.....
}

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

@Jon2G Jon2G added the t/bug Something isn't working label Jun 7, 2024
Copy link
Contributor

github-actions bot commented Jun 7, 2024

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:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

Jon2G added a commit to Jon2G/maui that referenced this issue Jun 7, 2024
@Jon2G Jon2G linked a pull request Jun 7, 2024 that will close this issue
@PureWeen PureWeen added the area-controls-general General issues that span multiple controls, or common base classes such as View or Element label Jun 8, 2024
@jsuarezruiz jsuarezruiz added the area-drawing Shapes, Borders, Shadows, Graphics, BoxView, custom drawing label Jun 10, 2024
@jsuarezruiz jsuarezruiz added this to the Backlog milestone Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-controls-general General issues that span multiple controls, or common base classes such as View or Element area-drawing Shapes, Borders, Shadows, Graphics, BoxView, custom drawing platform/android 🤖 platform/iOS 🍎 t/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants