Behavior of Page with both BackgroundColor and BackgroundImage set
#5,067 opened on Jan 26, 2019
Repository metrics
- Stars
- (5,644 stars)
- PR merge metrics
- (No merged PRs in 30d)
Description
Description
While working on PR #5066 for #5057 I noticed a potential issue when Page has both BackgroundColor and BackgroundImage set.
Steps to Reproduce
-
Set BackgroundColor="Red"
-
Set BackgroundImage="someimage.jpg" On all platforms, image is shown.
-
Set BackgroundColor=Color.Default iOS and UWP: image stays. This is because BackgroundImage is handled first before BackgroundColor, image takes priority over color. Android: image is gone, white background appears. Android doesn't handle the priority.
-
Set BackgroundColor="Red" iOS and UWP: image stays Android: background is Red
-
Set BackgroundImage=null iOS and UWP: Yay, background is finally red again! Android: Background is now white!
I attached a video with the described steps. pagebkgnd.zip
Expected Behavior
I'm not sure, I haven't been able to find it mentioned in the documentation portal what's expected to happen when both properties are set.
My proposal: like on iOS and UWP, have BackgroundImage take priority over BackgroundColor. When clearing the BackgroundImage, the Page should look with a background color of BackgroundColor.
Please let me know how you'd like this implemented, and I'd like to work on it
Actual Behavior
See it described in the steps above.
Basic Information
Latest code from my PR #5066.