Example #1
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            //var textEmail = new UITextField { Placeholder = "Username", BorderStyle = UITextBorderStyle.RoundedRect };
            //var textPassword = new UITextField { Placeholder = "Your password", BorderStyle = UITextBorderStyle.RoundedRect, SecureTextEntry = true };
            var loginButton = new UIButton(new CGRect(100, 100, 100, 100));

            loginButton.SetTitle("Log in", UIControlState.Normal);
            loginButton.BackgroundColor = UIColor.Black;


            var set = this.CreateBindingSet <SellersStatisticView, SellersStatisticViewModel>();

            //set.Bind(loginButton).For(l=>l.TitleLabel).To(vm => vm.StartDateValue);
            loginButton.SetTitle("селер", UIControlState.Normal);
            set.Bind(loginButton).To("SetStartTime");
            set.Apply();

            Add(loginButton);

            var table = new TemplateTableViewController <SellerCell
                                                         , SellersStatisticViewModel>
                            (ViewModel
                            , nameof(SellerStatisticValueConverter).Replace("ValueConverter", ""));

            View.AddSubview(table.View);
        }
Example #2
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            var loginButton = new UIButton(new CGRect(100, 100, 100, 100));

            loginButton.SetTitle("Кастомер", UIControlState.Normal);
            loginButton.BackgroundColor = UIColor.Black;

            var startDate = new UILabel(new CGRect(100, 200, 100, 100))
            {
                BackgroundColor = UIColor.Black
            };

            var set = this.CreateBindingSet <CustomersStatisticView, CustomersStatisticViewModel>();

            set.Bind(startDate).To(vm => vm.StartDateValue);
            // set.Bind(loginButton).For(l => l.TitleLabel.Text).To(vm => vm.StartDateValue);
            set.Bind(loginButton).To("SetStartTime");

            set.Apply();

            var table = new TemplateTableViewController <CustomerCell, CustomersStatisticViewModel>
                            (ViewModel
                            , nameof(CustomerStatisticValueConverter).Replace("ValueConverter", ""))
            {
                View = { Frame = new CGRect(0, 50, View.Frame.Width, 300) }
            };


            Add(loginButton);
            View.AddSubview(table.View);
        }