Пример #1
0
        public override void ViewDidLoad()
        {
            View = new UniversalView();

            base.ViewDidLoad();

            // Perform any additional setup after loading the view
            var textbox1 = new UITextField(new RectangleF(0, 0, 320, 50));
            Add(textbox1);
            var table = new UITableView(new RectangleF(0, 50, 320, 550));
            Add(table);
            var source = new MvxStandardTableViewSource(table, "TitleText Name; ImageUrl ImageUrl");
            table.Source = source;

            this.CreateBinding(textbox1).To<SecondViewModel>(vm => vm.Filter).Apply();
            this.CreateBinding(source).To<SecondViewModel>(vm => vm.Kittens).Apply();

            table.ReloadData();
        }
Пример #2
0
        public override void ViewDidLoad()
        {
            View = new UniversalView();

            base.ViewDidLoad();

            // Perform any additional setup after loading the view
            var label1 = new UILabel(new RectangleF(0, 0, 320, 50));
            Add(label1);
            var textbox1 = new UITextField(new RectangleF(0, 50, 320, 50));
            Add(textbox1);
            var button1 = new UIButton(UIButtonType.RoundedRect);
            button1.Frame = new RectangleF(0, 100, 320, 50);
            button1.SetTitle("Go", UIControlState.Normal);
            Add(button1);

            this.CreateBinding(label1).To<FirstViewModel>(vm => vm.Name).Apply();
            this.CreateBinding(textbox1).To<FirstViewModel>(vm => vm.Name).Apply();
            this.CreateBinding(button1).To<FirstViewModel>(vm => vm.GoCommand).Apply();
        }
Пример #3
0
        public override void ViewDidLoad()
        {
            View = new UniversalView();

            base.ViewDidLoad();

            // Perform any additional setup after loading the view
            var textbox1 = new UITextField(new RectangleF(0, 0, 320, 50));

            Add(textbox1);
            var table = new UITableView(new RectangleF(0, 50, 320, 550));

            Add(table);
            var source = new MvxStandardTableViewSource(table, "TitleText Name; ImageUrl ImageUrl");

            table.Source = source;

            this.CreateBinding(textbox1).To <SecondViewModel>(vm => vm.Filter).Apply();
            this.CreateBinding(source).To <SecondViewModel>(vm => vm.Kittens).Apply();

            table.ReloadData();
        }
Пример #4
0
        public override void ViewDidLoad()
        {
            View = new UniversalView();

            base.ViewDidLoad();

            // Perform any additional setup after loading the view
            var label1 = new UILabel(new RectangleF(0, 0, 320, 50));

            Add(label1);
            var textbox1 = new UITextField(new RectangleF(0, 50, 320, 50));

            Add(textbox1);
            var button1 = new UIButton(UIButtonType.RoundedRect);

            button1.Frame = new RectangleF(0, 100, 320, 50);
            button1.SetTitle("Go", UIControlState.Normal);
            Add(button1);

            this.CreateBinding(label1).To <FirstViewModel>(vm => vm.Name).Apply();
            this.CreateBinding(textbox1).To <FirstViewModel>(vm => vm.Name).Apply();
            this.CreateBinding(button1).To <FirstViewModel>(vm => vm.GoCommand).Apply();
        }