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

Push and pop NavigtionPage using dependency service.

$
0
0

I have a button created on PageRenderer:

        HomeLayout home = new HomeLayout();

protected override void OnElementChanged (VisualElementChangedEventArgs e)
        {
            base.OnElementChanged (e);
            var page = e.NewElement as HomeLayout;
            var view = NativeView;
            UIButton mybutton = new UIButton(...);
            [mybutton config]
            Add(mybutton);
        }

And I set a touch action to the button to open a forms view:

public override void ViewDidLoad ()
        {
            base.ViewDidLoad ();
            mybutton.TouchUpInside += delegate {
            home.Navigation.PushAsync(new AnotherView(), true);
            };
        }

I can't see any error here... but the page don't open :s


Viewing all articles
Browse latest Browse all 58056

Trending Articles



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