Reputation: 965
Is there any way to inject platform specific views into shared pages? Say I have a TabbedPage in my shared project, and I would like to inject a Page/View into it that uses the platform specific 2D drawing features, how would this best be solved?
Upvotes: 1
Views: 572
Reputation: 4746
In the ContentPage you can add your own custom view control, to which you can then implement Custom Renderers - one for each platform from this shared view.
Its from within the Custom Renderers classes where you can then access all the native APIs such like overriding the OnDraw(canvas canvas) and do your custom 2D drawing on Android etc.
When you mention Page/View, I am going to assume you are really meaning View, as I don't believe its possible to render a ContentPage within an existing ContentPage.
Upvotes: 1