Bug 40259 - [WinRT] PageRenderer.OnElementChanged is not virtual
Summary: [WinRT] PageRenderer.OnElementChanged is not virtual
Status: RESOLVED ANSWERED
Alias: None
Product: Forms
Classification: Xamarin
Component: Windows ()
Version: 2.0.0
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
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:


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


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:
Status:
RESOLVED ANSWERED

Description kkrause95 2016-04-10 03:48:00 UTC
Created attachment 15664 [details]
Example

In Xamarin.Forms.Platform.WinRT.dll, version 1.4.2.6353-pre2 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="2.0.0.6490" targetFramework="wpa81" />
Comment 2 kkrause95 2016-04-10 03:57:58 UTC
Created attachment 15665 [details]
Same on Xamarin Forms 2.1.0.6529
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.