protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); /* // Set our view from the "main" layout resource SetContentView(Resource.Layout.Main); // Get our button from the layout resource, // and attach an event to it Button button = FindViewById<Button>(Resource.Id.MyButton); button.Click += delegate { button.Text = string.Format("{0} clicks!", count++); }; */ RootElement re = new MonoMobileDialogUI().CreateDialogUI(); // mc++: equivalent to MonoTouchDialog.DialogViewController DialogAdapter da = new DialogAdapter(this, re); // mc++: equivalent to MonoTouch UINavigationController ListView lv = new ListView(this) { Adapter = da }; // mc++: equivalent to MonoTouch Window // Activity.SetContentView ~ Window.RootViewController iOS 5+ // Activity.SetContentView ~ Window.AddSubview iOS other SetContentView(lv); }
protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); /* * // Set our view from the "main" layout resource * SetContentView(Resource.Layout.Main); * * // Get our button from the layout resource, * // and attach an event to it * Button button = FindViewById<Button>(Resource.Id.MyButton); * * button.Click += delegate { button.Text = string.Format("{0} clicks!", count++); }; */ RootElement re = new MonoMobileDialogUI().CreateDialogUI(); // mc++: equivalent to MonoTouchDialog.DialogViewController DialogAdapter da = new DialogAdapter(this, re); // mc++: equivalent to MonoTouch UINavigationController ListView lv = new ListView(this) { Adapter = da }; // mc++: equivalent to MonoTouch Window // Activity.SetContentView ~ Window.RootViewController iOS 5+ // Activity.SetContentView ~ Window.AddSubview iOS other SetContentView(lv); }