Open davidbritch opened 1 year ago
We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.
Verified this issue with Visual Studio Enterprise 17.8.0 Preview 3.0. Can repro on android platform with sample project. https://github.com/davidbritch/dotnet-maui-issues/tree/main/Embedding
Note the Page.Appearing and Page.Disappearing events also do not fire when using MAUI embedded.
We're trying to migrate our mission critical mobile application from Xamarin Android\iOS with embedded Xamarin Forms to .NET 7 Android\iOS using embedded MAUI and the embedded use case appears to be severely broken. This is but one of many issues we've encountered.
Being able to hook into when the page appears and disappears is a pretty common use case. This has been open since 2022 - can we please get some priority placed on resolving this? Not sure if any of the work proposed under Issue 1718 would get this closer to resolved?
I also have sample repro code in the 'simple-maui-embedded' solution from https://github.com/nau-dwb/maui-embedded-use-issues/tree/main
Issues like these are hindering migration for several larger Xamarin apps to MAUI. We have an app making extensive use of Xamarin.Forms embedding.
Unfortunately, we didn't properly take into account multi-window with embedding so there are a few paths that don't light up with embedding.
I've modified the sample here to light up "appearing" and "disappearing"
https://github.com/PureWeen/maui-embedded-use-issues/commit/dd8a660ec9e595ce15274c26777035cc1a328b2d
In XF we just wired appearing/disappearing to platform hooks so that's really what this work comes down to.
If for some reason the code I have setting up a window doesn't work for you, then I'd just recommend calling through to your own methods on the ContentPage that fire at the same points in time
Description
I've been playing around with native embedding. In native apps on Android, iOS, and Windows, the
ContentPage.OnAppearing
override isn't being invoked on navigation, whereas it is in .NET MAUI apps. This makes it more difficult to load data on page load, which many people tend to do inOnAppearing
.This behaviour is identical in .NET 6 and 7, so I suspect it's more an omission than a regression.
Steps to Reproduce
The breakpoint is never hit.
Link to public reproduction project repository
https://github.com/davidbritch/dotnet-maui-issues/tree/main/Embedding
Version with bug
.NET 7 GA (also occurs in .NET 6)
Last version that worked well
Don't think it's ever worked.
Affected platforms
iOS, Android, Windows