使用依赖服务推送和弹出NavigationPage

时间:2015-03-18 12:14:23

标签: c# ios forms xamarin pushviewcontroller

我在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);
        }

我在按钮上设置了触摸操作以打开表单视图:

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

我在这里看不到任何错误...但页面无法打开:s

0 个答案:

没有答案