dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
21.99k stars 1.72k forks source link

ContentPage unload event fires, if another page is opened, not if at unload #24410

Closed vsfeedback closed 6 days ago

vsfeedback commented 3 weeks ago

This issue has been moved from a ticket on Developer Community.


Maui project, (android emulator) newest VS version 17.11.1

The contentPage unload event fires, if another page is opened. Yes the page disappears. Xamarin makes it right to fire the disappearing event. But Maui fires the unload event, if the page is not unloaded.

Repro steps:


Original Comments

Feedback Bot on 8/21/2024, 06:29 PM:

(private comment, text removed)


Original Solutions

(no solutions)

github-actions[bot] commented 3 weeks ago

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

PureWeen commented 2 weeks ago

The unloaded event fires when something is removed from the visual tree

https://learn.microsoft.com/en-us/dotnet/api/microsoft.maui.controls.visualelement.unloaded?view=net-maui-8.0

We're just monitoring platform events for when the view is removed. Maybe try using Navigating/Navigated events instead?

dotnet-policy-service[bot] commented 2 weeks ago

Hi @vsfeedback. We have added the "s/needs-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

dotnet-policy-service[bot] commented 1 week ago

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. If it is closed, feel free to comment when you are able to provide the additional information and we will re-investigate.