Java.Lang.IllegalStateException: The specified child already has a parent. Easy to repro #20310
Labels
area-layout
StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter
platform/android 🤖
t/bug
Something isn't working
Milestone
Description
If you remove a control from a layouts child collection the native parents are not set to null. This results in a crash, if you try to add it again.
Reprocode:
scroller.Content
sets the VirtualViews Parent to null, but not the PlatformViews Parent.Steps to Reproduce
Click button in repro
Link to public reproduction project repository
MauiApp5.zip
No response
Version with bug
8.0.6
Is this a regression from previous behavior?
Yes, this used to work in Xamarin.Forms
Last version that worked well
Unknown/Other
Affected platforms
Android, Windows
Affected platform versions
No response
Did you find any workaround?
No response
Relevant log output
No response
The text was updated successfully, but these errors were encountered: