[Bug] BoxView loses background color when its parent is removed and re-added to the container
See original GitHub issueDescription
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
- Create an AbsoluteLayout, Grid inside with BoxView
- 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:
the target after being removed and readded to the container
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:
- Created 2 years ago
- Comments:9 (7 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Fix is merged in MAUI.Graphics - once we get the new version pulled into MAUI we can test again and possibly close this.
Not reproducible with windows 10.0.19041.