protected override void OnCreate (Bundle bundle) { SetContentView (Resource.Layout.UserRegister); base.OnCreate (bundle); // Create your application here var btnBack = FindViewById<Button> (Resource.Id.btnUserRgst_Back); btnBack.Click += (object sender, EventArgs e) => { StartActivity(typeof(MainActivity)); }; }
假如要传值,能够运用intent:
var intent = new Intent(this, typeof(UserRegister)); StartActivity(intent);
以上就是C# 运用Xamarin 开辟运用 -- 切换Activity 的内容,更多相关内容请关注ki4网(www.ki4.cn)!