示例#1
0
        public override void ViewDidLoad()
        {
            View = new UniversalView();

            base.ViewDidLoad();

            var textField = new UITextField(new RectangleF(10, 10, 300, 40));

            Add(textField);

            var label1 = new UILabel(new RectangleF(10, 50, 300, 40));

            Add(label1);

            var label2 = new UILabel(new RectangleF(10, 90, 300, 40));

            Add(label2);

            var label3 = new UILabel(new RectangleF(10, 130, 300, 40));

            Add(label3);

            var set = this.CreateBindingSet <FirstView, FirstViewModel>();

            set.Bind(textField).To(vm => vm.Foo).WithConversion("StringReverse");
            set.Bind(label1).To(vm => vm.Foo);
            set.Bind(label2).To(vm => vm.Foo).WithConversion("StringLength");
            set.Bind(label3).To(vm => vm.Foo).WithConversion("Special");
            set.Apply();
        }
示例#2
0
        public override void ViewDidLoad()
        {
            View = new UniversalView();

            base.ViewDidLoad();

            var textField = new UITextField(new RectangleF(10, 10, 300, 40));
            Add(textField);

            var label1 = new UILabel(new RectangleF(10, 50, 300, 40));
            Add(label1);

            var label2 = new UILabel(new RectangleF(10, 90, 300, 40));
            Add(label2);

            var label3 = new UILabel(new RectangleF(10, 130, 300, 40));
            Add(label3);

            var set = this.CreateBindingSet<FirstView, FirstViewModel>();
            set.Bind(textField).To(vm => vm.Foo).WithConversion("StringReverse");
            set.Bind(label1).To(vm => vm.Foo);
            set.Bind(label2).To(vm => vm.Foo).WithConversion("StringLength");
            set.Bind(label3).To(vm => vm.Foo).WithConversion("Special");
            set.Apply();
        }
        public override void ViewDidLoad()
        {
            View = new UniversalView();

            base.ViewDidLoad();

            // ios7 layout
            if (RespondsToSelector(new Selector("edgesForExtendedLayout")))
                EdgesForExtendedLayout = UIRectEdge.None;

            var textField = new UITextField(new RectangleF(10, 10, 300, 40));
            Add(textField);

            var label1 = new UILabel(new RectangleF(10, 50, 300, 40));
            Add(label1);

            var label2 = new UILabel(new RectangleF(10, 90, 300, 40));
            Add(label2);

            var label3 = new UILabel(new RectangleF(10, 130, 300, 40));
            Add(label3);

            var set = this.CreateBindingSet<FirstView, FirstViewModel>();
            set.Bind(textField).To(vm => vm.Foo).WithConversion("StringReverse");
            set.Bind(label1).To(vm => vm.Foo);
            set.Bind(label2).To(vm => vm.Foo).WithConversion("StringLength");
            set.Bind(label3).To(vm => vm.Foo).WithConversion("Special");
            set.Apply();
        }
示例#4
0
        public override void ViewDidLoad()
        {
            View = new UniversalView();

            base.ViewDidLoad();

            // ios7 layout
            if (RespondsToSelector(new Selector("edgesForExtendedLayout")))
            {
                EdgesForExtendedLayout = UIRectEdge.None;
            }

            var textField = new UITextField(new RectangleF(10, 10, 300, 40));

            Add(textField);

            var label1 = new UILabel(new RectangleF(10, 50, 300, 40));

            Add(label1);

            var label2 = new UILabel(new RectangleF(10, 90, 300, 40));

            Add(label2);

            var label3 = new UILabel(new RectangleF(10, 130, 300, 40));

            Add(label3);

            var set = this.CreateBindingSet <FirstView, FirstViewModel>();

            set.Bind(textField).To(vm => vm.Foo).WithConversion("StringReverse");
            set.Bind(label1).To(vm => vm.Foo);
            set.Bind(label2).To(vm => vm.Foo).WithConversion("StringLength");
            set.Bind(label3).To(vm => vm.Foo).WithConversion("Special");
            set.Apply();
        }