(This is a beginner question on Xamarin.Forms - it´s my first attempt creating a custom control :-)
I am trying to create a Xamarin.Forms control for OxyPlot using the Customizing Controls for Each Platform article.
I did the following steps
- created an
OxyPlot.XamarinForms.PlotView
class based onXamarin.Forms.View
in a portable project. - created an
OxyPlot.XamarinFormsIOS.PlotViewRenderer
and added aExportRendererAttribute
in a Xamarin.iOS project. - created an
App
class in a portable project - created an Xamarin.iOS app where the view controller is created from the
App
and referenced all the other projects
But nothing shows up. What part is missing? Debugging shows that the PlotViewRenderer
is never called. If I replace the PlotView
by a Button
in the App
, the button shows up fine. Is something wrong with the ExportRendererAttribute?
The source code is at https://github.com/objorke/oxyplot/tree/features/XamarinForms, see the Source/OxyPlot.XamarinForms.sln
solution.