question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug] BoxView loses background color when its parent is removed and re-added to the container

See original GitHub issue

Description

BoxView loses background color when its parent is removed and re-added to the container. Rearrange is added in order to change the control’s (target) z-index to move on top of other items.

Steps to Reproduce

  1. Create an AbsoluteLayout, Grid inside with BoxView
  2. Remove and re-add the Grid from/to AbosoluteLayout container

Expected Behavior

BoxView keeps the background color

Actual Behavior

BoxView has no background after the step 2

Basic Information

  • Version with issue: 6.0.100-rc.2.21505.57
  • Last known good version: NA
  • IDE: VS2022 - Preview 5
  • Platform Target Frameworks: iOS, Android, Windows

Screenshots

the target in its original state: image

the target after being removed and readded to the container image

Reproduction Link

<Grid x:Name="target">
    <BoxView BackgroundColor="Red" WidthRequest="50" HeightRequest="50" />
</Grid>

var targetContainer = target.Parent as Layout;
targetContainer.Children.Remove(target);
targetContainer.Children.Add(target);

Workaround

None is found

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
hartezcommented, Nov 13, 2021

Fix is merged in MAUI.Graphics - once we get the new version pulled into MAUI we can test again and possibly close this.

0reactions
kristinx0211commented, Feb 22, 2022

Not reproducible with windows 10.0.19041.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why does a container inside a container loses its ...
I floated "my-blog" and "my-game" to left and it loses its background-color. Why does the background color of the second container ("my-blog" ...
Read more >
Xamarin.Forms 4.6.0.800 (4.6.0 Service Release 2) ...
Release notes detailing new features, improvements, and issues fixed in Xamarin.Forms 4.6.0.800 (4.6.0 Service Release 2)
Read more >
HELP! Missing background color for containers - Mobile
The solution was to duplicate the entire custom collection and then just delete the old one. The duplicated collection works as intended.
Read more >
Frame phrase - Progress Documentation
Specifies whether the following field-level widgets in the frame inherit the frame's background color: BROWSE, COMBO-BOX (all types), EDITOR, FILL-IN (NATIVE ...
Read more >
Freezerworks Basic Users Guide
The system admin can change the background color of screens. ... The Samples table is a parent table, and in this case there...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found