Using this custom renderer causes InvalidCastException inside the base class OnElementChanged function:
[assembly: ExportRenderer(typeof(NavigationPage), typeof(NavigationPageRenderer))]
public class NavigationPageRenderer : NavigationRenderer
protected override void OnElementChanged(ElementChangedEventArgs<NavigationPage> e)
It may or may not matter, but in my case, the NavigationPage in question is being used inside a MasterDetailPage Detail pane.
This bug appears to be documented elsewhere:
Ah... I figured out the problem.
It's AppCompat vs. regular. Which I had no idea was a thing until encountering this.
It would be really useful to have an informative exception message to direct developers to the correct classes.