我在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