Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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.
we encountered the following bug when using Xamarin.Forms for Windows Store apps:
When hitting the back button a page using NControl-based elements will be destroyed. More precisely the Dispose(Boolean) method of the Xamarin.Forms.Platform.WinRT.VisualElementRenderer will be called. Within this method, SetElement() is called.
Unfortunately this causes a call of the event handler OnElementChanged(), which tries to reinitilize the element based on the condition Control != null. Here we see, that the current sequence does not make sense.
In my opinion the Dispose(Boolean) method of the Xamarin.Forms.Platform.WinRT.VisualElementRenderer should call Element = null instead of SetElement(null) as on Android.
The reason SetElement is called is that you can use that single method to unhook events from the Element that you would otherwise need to duplicate into Dispose. We wanted to bring this everywhere but cant really do it as it would be a massive breaking change. We will at some point in the future take this break with a major release.