-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Labels
area-controls-generalGeneral issues that span multiple controls, or common base classes such as View or ElementGeneral issues that span multiple controls, or common base classes such as View or Elementarea-drawingShapes, Borders, Shadows, Graphics, BoxView, custom drawingShapes, Borders, Shadows, Graphics, BoxView, custom drawingplatform/androidplatform/iost/bugSomething isn't workingSomething isn't working
Milestone
Description
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
Metadata
Metadata
Assignees
Labels
area-controls-generalGeneral issues that span multiple controls, or common base classes such as View or ElementGeneral issues that span multiple controls, or common base classes such as View or Elementarea-drawingShapes, Borders, Shadows, Graphics, BoxView, custom drawingShapes, Borders, Shadows, Graphics, BoxView, custom drawingplatform/androidplatform/iost/bugSomething isn't workingSomething isn't working