Bug 30606 - The is no reliable way to tell when a view is removed from the visual tree
Summary: The is no reliable way to tell when a view is removed from the visual tree
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.4.2
Hardware: PC Windows
: Normal enhancement
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2015-05-29 17:00 UTC by philip
Modified: 2016-04-09 00:42 UTC (History)
3 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description philip 2015-05-29 17:00:03 UTC
In general, a view may need to know when it's removed from the visual tree (Parent set to null) the same way that it needs to know when it is added (Parent set to non-null).  However, there is no reliable method of doing this.  In some cases OnParentSet is called when the Parent is set to null, but in other cases it is not.

There needs to be a way for a view to reliably know when it is removed from the visual tree.
Comment 1 Jason Smith [MSFT] 2016-04-09 00:42:28 UTC
Thank you for taking the time to submit this feature request. We like this idea and have added it to our internal feature tracking system.

Warm regards,
Xamarin Forms Team