Bug 40259 - [WinRT] PageRenderer.OnElementChanged is not virtual
Summary: [WinRT] PageRenderer.OnElementChanged is not virtual
Alias: None
Product: Forms
Classification: Xamarin
Component: Windows ()
Version: 2.0.0
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2016-04-10 03:48 UTC by kkrause95
Modified: 2016-11-01 15:57 UTC (History)
3 users (show)

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

Example (105.45 KB, image/png)
2016-04-10 03:48 UTC, kkrause95
Same on Xamarin Forms (122.43 KB, image/png)
2016-04-10 03:57 UTC, kkrause95

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 kkrause95 2016-04-10 03:48:00 UTC
Created attachment 15664 [details]

In Xamarin.Forms.Platform.WinRT.dll, version the method Xamarin.Forms.Platform.WinRT.PageRenderer.OnElementChanged is not virtual. Therefore custom renderers cannot override it.

Furthermore the method OnElementPropertyChanged is missing. This method should also be virtual in all renderers. 

Same happens on NavigationPageRenderer.
Comment 1 kkrause95 2016-04-10 03:50:47 UTC
I pasted the wrong version its on the following version:

<package id="Xamarin.Forms" version="" targetFramework="wpa81" />
Comment 2 kkrause95 2016-04-10 03:57:58 UTC
Created attachment 15665 [details]
Same on Xamarin Forms
Comment 3 Paul DiPietro [MSFT] 2016-11-01 15:57:58 UTC
You should be able to override these. PageRenderer explicitly overrides OnElementChanged, but OnElementPropertyChanged is not overridden which is why it does not show up in the metadata. The Xamarin.Forms source code is open for you to view to see PageRenderer's implementation.