Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

PageRenderer.OnModelSet is gone from 1.2.x

$
0
0

Need to bring native pages to XF.. need to override PageRenderer.OnModelSet just like in

`
// This ExportRenderer command tells Xamarin.Forms to use this renderer
// instead of the built-in one for this page
[assembly:ExportRenderer(typeof(Forms2Native.MyThirdPage), typeof(Forms2Native.MyThirdPageRenderer))]

namespace Forms2Native
{
///
/// Render this page using platform-specific UIKit controls
///
public class MyThirdPageRenderer : PageRenderer
{
protected override void OnModelSet (Xamarin.Forms.VisualElement model)
{
base.OnModelSet (model);

        var page = model as MyThirdPage;

        var hostViewController = ViewController;

        var viewController = new UIViewController ();

`

complete example at
https://github.com/xamarin/xamarin-forms-samples/tree/master/Forms2Native

this example does no longer compile with XF 1.2.x

any help would be appreciated..

tnx


Viewing all articles
Browse latest Browse all 58056

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>