MAUI 8.06 Windows Flyout "Element is already the child of another element"

cross-posted from: programming.dev/post/9780587

In MAUI 8.03 we had the Flyout bug where the NavigationPage Title wouldn’t update from the first page you had been on. In MAUI 8.06 that bug has been fixed but has introduced a new one on Windows (sigh).

Starting on Page1 I can use the Flyout to switch to Page2. Then, on Windows, if I use Flyout to switch back to already-existing Page1 it crashes with…


<span style="color:#323232;">System.Runtime.InteropServices.COMException (0x800F1000): No installed components were detected.
</span><span style="color:#323232;">
</span><span style="color:#323232;">Element is already the child of another element
</span>

It works on Android, and it works if you are creating a new page each time, it just doesn’t work on Windows to switch back to an already-created page (which defeats the whole purpose of having a Flyout menu - switch between 2 pages without making a new one every time).

  1. Does anyone know of a workaround to this? I can’t find anything that relates to this in the context of a MAUI Flyout.
  2. Does anyone have a real simple Flyout template that could be used for the repro (to put in the issue I’m gonna need to create). The one I’m working on has a whole bunch of my own libraries in it, so I’m gonna need to tear them all out before I can use it to make a repro (and of course they don’t provide a template, and their sample doesn’t work due to different bugs - sigh).
SmartmanApps,
@SmartmanApps@programming.dev avatar

I’ve narrowed this down to using NavigationPage.SetTitleView and have created issue 21037, which has an 806issue branch in the repro repo.

SmartmanApps,
@SmartmanApps@programming.dev avatar

I finally fixed up the MAUI/VS upgrade issues, recloned, added my code back in one part at a time, and the bug came back so I’ve now narrowed down where the issue is - it happens when I try to use a HorizontalStackLayout in my TitleView on Windows. This code absolutely was working in 8.0.3, and still works on Android in 8.0.6. (I haven’t tried 8.0.7 yet cos I wanted to keep everything exactly the same as before whilst I added code back in seeing if the issue came back). Anyone have any ideas about this one?

  • All
  • Subscribed
  • Moderated
  • Favorites
  • csharp@programming.dev
  • ngwrru68w68
  • rosin
  • GTA5RPClips
  • osvaldo12
  • love
  • Youngstown
  • slotface
  • khanakhh
  • everett
  • kavyap
  • mdbf
  • DreamBathrooms
  • thenastyranch
  • magazineikmin
  • megavids
  • InstantRegret
  • normalnudes
  • tacticalgear
  • cubers
  • ethstaker
  • modclub
  • cisconetworking
  • Durango
  • anitta
  • Leos
  • tester
  • provamag3
  • JUstTest
  • All magazines