예제 #1
0
        public override void LayoutSubviews()
        {
            base.LayoutSubviews();
            ;

            var checkbox = new BEMCheckBox(new CoreGraphics.CGRect(9, 9, 27, 27));

            checkbox.OnCheckColor                 = Color.FromHex("97BD57").ToUIColor();
            checkbox.OnTintColor                  = Color.FromHex("97BD57").ToUIColor();
            checkbox.OnAnimationType              = BEMAnimationType.Fill;
            checkbox.OffAnimationType             = BEMAnimationType.Fill;
            checkbox.AnimationDidStopForCheckBox += CheckBoxClickedEvent;
            //ShopList shop = new ShopList();
            //while (shop != null)
            //{
            //    if (shop.checker == 0)
            //    {
            //        checkbox.On = false;
            //    }
            //    else
            //    {
            //        checkbox.On = true;

            //    }
            //    shop = null;
            //}

            CheckBox.AddSubview(checkbox);

            MvxFluentBindingDescriptionSet <ShopListViewCell, ShopList> set = new MvxFluentBindingDescriptionSet <ShopListViewCell, ShopList>(this);

            set.Bind(CheckListItem).To(res => res.Ingredients);
            set.Apply();
        }
예제 #2
0
        public override void ViewDidLoad()
        {
            try
            {
                base.ViewDidLoad();

                MvxFluentBindingDescriptionSet <DetailView2, DetailView2Model> set = this.CreateBindingSet <DetailView2, DetailView2Model>();
                set.Bind(imgBackground).To(vm => vm.ChampionDetail.Image.backgroundImage).WithConversion <StringToImageConverter>();

                set.Bind(lblSpellName).To(vm => vm.SpellName);
                set.Bind(lblSpellText).To(vm => vm.SpellText);



                btnPassive.SetBackgroundImage(ViewModel.GetOnlineImage(ViewModel.ChampionDetail.Passive.Image.SpellImage), UIControlState.Normal);
                set.Bind(btnPassive).To(vm => vm.ChangeTextCommand).CommandParameter("Passive");
                btnAbility1.SetBackgroundImage(ViewModel.GetOnlineImage(ViewModel.ChampionDetail.Spells[0].Image.SpellImage), UIControlState.Normal);
                set.Bind(btnAbility1).To(vm => vm.ChangeTextCommand).CommandParameter("Spell 1");
                btnAbility2.SetBackgroundImage(ViewModel.GetOnlineImage(ViewModel.ChampionDetail.Spells[1].Image.SpellImage), UIControlState.Normal);
                set.Bind(btnAbility2).To(vm => vm.ChangeTextCommand).CommandParameter("Spell 2");
                btnAbility3.SetBackgroundImage(ViewModel.GetOnlineImage(ViewModel.ChampionDetail.Spells[2].Image.SpellImage), UIControlState.Normal);
                set.Bind(btnAbility3).To(vm => vm.ChangeTextCommand).CommandParameter("Spell 3");
                btnAbility4.SetBackgroundImage(ViewModel.GetOnlineImage(ViewModel.ChampionDetail.Spells[3].Image.SpellImage), UIControlState.Normal);
                set.Bind(btnAbility4).To(vm => vm.ChangeTextCommand).CommandParameter("Spell 4");



                set.Apply();
            }
            catch (Exception ex)
            {
                Console.Write(ex);
            }
        }
        public override void ViewDidLoad()
        {
            try
            {
                base.ViewDidLoad();
                _skinViewSource = new SkinViewSource(SkinCollection);


                SkinCollection.Source = _skinViewSource;
                SkinCollection.ReloadData();
            }
            catch (Exception ex)
            {
                Console.Write(ex);
            }
            MvxFluentBindingDescriptionSet <DetailView3, DetailView3Model> set = this.CreateBindingSet <DetailView3, DetailView3Model>();

            set.Bind(imgBackground).For(iv => iv.Image).To(a => a.SkinImage).WithConversion <StringToImageConverter>();

            set.Bind(_skinViewSource).To(vm => vm.ChampionDetailSkins);
            set.Bind(_skinViewSource)
            .For(src => src.SelectionChangedCommand)
            .To(vm => vm.SkinSelectedCommand);

            set.Apply();
        }
예제 #4
0
        public override void ViewDidLoad()
        {
            if (!_constructed)
            {
                return;
            }
            base.ViewDidLoad();

            NavigationItem.RightBarButtonItem = new UIBarButtonItem(UIBarButtonSystemItem.Add);
            NavigationItem.SetHidesBackButton(true, false);

            UIBarButtonItem LogoutButton = new UIBarButtonItem
            {
                Title = "Logout"
            };

            NavigationItem.LeftBarButtonItem = LogoutButton;

            MvxFluentBindingDescriptionSet <JobTabView, JobTabViewModel> set = new MvxFluentBindingDescriptionSet <JobTabView, JobTabViewModel>(this);

            set.Bind(NavigationItem.RightBarButtonItem).To(vm => vm.NavigateToAddJobCommand);
            set.Bind(NavigationItem.LeftBarButtonItem).To(vm => vm.NavigateToLogoutCommand);
            set.Apply();

            CreateTabs();
        }
        public override void ViewDidLoad()
        {
            _tableViewSource = new BestsellersTableViewSource(MyTableView);

            base.ViewDidLoad();

            MyTableView.Source = _tableViewSource;
            MyTableView.ReloadData();

            MvxFluentBindingDescriptionSet <SearchBooksTableView, SearchBooksTableViewModel> set = this.CreateBindingSet <SearchBooksTableView, SearchBooksTableViewModel>();

            set.Bind(txtSearch)
            .To(vm => vm.SearchValue);
            set.Bind(_tableViewSource)
            .To(vm => vm.SearchResult);
            set.Bind(_tableViewSource)
            .For(src => src.SelectionChangedCommand)
            .To(vm => vm.ParentViewModel.NavigateToDetailCommand);
            set.Bind(btnSearch)
            .To(vm => vm.SearchBooksCommand);
            set.Bind(btnLoadMore)
            .To(vm => vm.LoadMoreCommand);
            set.Bind(btnLoadMore)
            .For(v => v.Enabled)
            .To(vm => vm.HasTwentyResults);
            set.Apply();
        }
예제 #6
0
        public override void ViewDidLoad()
        {
            try
            {
                base.ViewDidLoad();



                MvxFluentBindingDescriptionSet <TabInfoView, TabInfoViewModel> set =
                    this.CreateBindingSet <TabInfoView, TabInfoViewModel>();

                set.Bind(lblName).To(vm => vm.RestaurantContent.Name);
                set.Bind(lblPriceRange).To(vm => vm.RestaurantContent.PriceRangeString);
                set.Bind(lblCuisines).To(vm => vm.RestaurantContent.Cuisines);
                set.Bind(lblAddress).To(vm => vm.RestaurantContent.Location.Address);
                set.Bind(lblScore).To(vm => vm.RestaurantContent.Score);
                set.Bind(lblScore).For(lbl => lbl.BackgroundColor).To(vm => vm.RestaurantContent.Score).WithConversion <ScoreToColorConverter>();
                set.Bind(imgRestaurant)
                .For(img => img.Image)
                .To(vm => vm.RestaurantContent.ImageUrl)
                .WithConversion <StringToImageConverter>();

                set.Apply();
            }
            catch (Exception e)
            {
                throw e;
            }
        }
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

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

            MvxFluentBindingDescriptionSet <LoginViewController, LoginViewModel> set =
                this.CreateBindingSet <LoginViewController, LoginViewModel>();

            set.Bind(textField_Email).To(vm => vm.Email);
            set.Bind(textField_Password).To(vm => vm.Password);
            set.Bind(btn_Login).To(x => x.LoginCommand);
            set.Apply();

            var gestureRecognizer = new UITapGestureRecognizer(() =>
            {
                textField_Email.ResignFirstResponder();
                textField_Password.ResignFirstResponder();
            });

            View.AddGestureRecognizer(gestureRecognizer);
        }
예제 #8
0
        protected override void BindView()
        {
            MvxFluentBindingDescriptionSet <MainViewController, MainViewModel>
            bindingSet = this.CreateBindingSet <MainViewController, MainViewModel>();

            bindingSet.Apply();
        }
        void Bind()
        {
            _bindingSet = this.CreateBindingSet <FirstViewController, FirstViewModel>();

            _bindingSet.Bind(_goForwardButton).To(vm => vm.GoForwardCommand);

            _bindingSet.Apply();
        }
예제 #10
0
        void Bind()
        {
            _bindingSet = this.CreateBindingSet <SecondViewController, SecondViewModel>();

            _bindingSet.Bind(_goBackButton).To(vm => vm.GoBackCommand);

            _bindingSet.Apply();
        }
예제 #11
0
        private void SetBinding()
        {
            bindingSet = this.CreateBindingSet <MedicationDosageView, MedicationDosageViewModel>();

            //sposob na bezposrednie sluchanie observable. W momencie, gdy CanExecute sie zmieni wykona sie kod z Subscribe
            this.ViewModel.Delete.CanExecute.Subscribe(canExecute => deleteBtn.Visibility = canExecute ? ViewStates.Visible : ViewStates.Gone);

            bindingSet.Bind(this.SupportActionBar)
            .To(x => x.MedicationName)
            .For(v => v.Title)
            .WithConversion(new InlineValueConverter <string, string>(medicationName =>
            {
                if (string.IsNullOrEmpty(medicationName))
                {
                    return(this.ViewModel.Id.HasValue ? "" : AppResources.MedicationDosageViewModel_Title);
                }
                return(medicationName);
            }));

            bindingSet.Bind(nameText)
            .To(x => x.MedicationName);

            bindingSet.Bind(picture)
            .To(x => x.Bytes)
            .For("Bitmap")
            .WithConversion(new MvxInMemoryImageValueConverter());

            bindingSet.Bind(picture)
            .To(x => x.Bytes)
            .For(v => v.Visibility)
            .WithConversion(new InlineValueConverter <byte[], ViewStates>((byte[] arg) => arg == null ? ViewStates.Gone : ViewStates.Visible));

            bindingSet.Bind(takePicutre)
            .For(nameof(View.Click))
            .To(vm => vm.TakePhotoCommand);

            bindingSet.Bind(dosageText)
            .To(vm => vm.MedicationDosage);
            bindingSet.Bind(everyday)
            .For(nameof(View.Click))
            .To(vm => vm.SelectAllDays);
            bindingSet.Bind(everyday)
            .For(v => v.Checked)
            .To(vm => vm.Everyday);
            bindingSet.Bind(custom)
            .For(v => v.Checked)
            .To(vm => vm.Cusom);



            bindingSet.Bind(hoursList)
            .For(x => x.ItemsSource)
            .To(vm => vm.DosageHours);
            bindingSet.Apply();


            //Bitmap.Compress(Bitmap.CompressFormat.Jpeg, 100, stream);
        }
예제 #12
0
        void Bind()
        {
            _bindingSet = this.CreateBindingSet <VectorViewController, VectorViewModel>();

            _bindingSet.Bind(_sizeSlider).To(vm => vm.Size);
            _bindingSet.Bind(_vectorImageView).For(iOSConstants.SIZE_TARGET_BINDING_KEY).To(vm => vm.Size);

            _bindingSet.Apply();
        }
예제 #13
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            MvxFluentBindingDescriptionSet <TabDetailsView, TabDetailsViewModel> set = this.CreateBindingSet <TabDetailsView, TabDetailsViewModel>();

            //ANIMATIES OPVRAGEN, GROTE INSTELLEN, SCALEN, LOOP & BINDEN MET HUN IMAGE
            this._uvIndexAnimation             = LOTAnimationView.AnimationNamed("UVIndexAnim.json"); //your animation name for the uv sun
            this._uvIndexAnimation.Frame       = new CoreGraphics.CGRect(0, 0, 50, 50);               //Depending on the dimensions of you animation and cell
            this._uvIndexAnimation.ContentMode = UIViewContentMode.ScaleAspectFill;
            this.imgUvInd.AddSubview(this._uvIndexAnimation);

            this._pressureAnimation               = LOTAnimationView.AnimationNamed("Pressure.json");
            this._pressureAnimation.Frame         = new CoreGraphics.CGRect(0, 0, 50, 50); //Depending on the dimensions of you animation and cell
            this._pressureAnimation.ContentMode   = UIViewContentMode.ScaleAspectFill;
            this._pressureAnimation.LoopAnimation = true;
            this.imgPress.AddSubview(this._pressureAnimation);

            this._humidityAnimation             = LOTAnimationView.AnimationNamed("Humidity.json");
            this._humidityAnimation.Frame       = new CoreGraphics.CGRect(0, 0, 50, 50); //Depending on the dimensions of you animation and cell
            this._humidityAnimation.ContentMode = UIViewContentMode.ScaleAspectFill;
            this.imgHum.AddSubview(this._humidityAnimation);

            this._visibilityAnimation               = LOTAnimationView.AnimationNamed("Visibility.json");
            this._visibilityAnimation.Frame         = new CoreGraphics.CGRect(0, 0, 50, 50); //Depending on the dimensions of you animation and cell
            this._visibilityAnimation.ContentMode   = UIViewContentMode.ScaleAspectFill;
            this._visibilityAnimation.LoopAnimation = true;
            this.imgVis.AddSubview(this._visibilityAnimation);

            this._dewpointAnimation             = LOTAnimationView.AnimationNamed("dewing.json");
            this._dewpointAnimation.Frame       = new CoreGraphics.CGRect(0, 0, 50, 50); //Depending on the dimensions of you animation and cell
            this._dewpointAnimation.ContentMode = UIViewContentMode.ScaleAspectFill;
            this.imgDew.AddSubview(this._dewpointAnimation);

            this._apparenttempAnimation               = LOTAnimationView.AnimationNamed("apparenttemp.json");
            this._apparenttempAnimation.Frame         = new CoreGraphics.CGRect(0, 0, 50, 50); //Depending on the dimensions of you animation and cell
            this._apparenttempAnimation.ContentMode   = UIViewContentMode.ScaleAspectFill;
            this._apparenttempAnimation.LoopAnimation = true;
            this.imgApparentTemp.AddSubview(this._apparenttempAnimation);

            //set.Bind(_uvIndexAnimation).For(ani => ani.SceneModel);

            /*
             * .To(rev => rev.Weather.Currently.UvIndex)
             * .WithConversion<StringToImageConverter>();
             */

            //Alle details binden met de waarden
            set.Bind(lblApparentTemp).To(vm => vm.Weather.Currently.ApparentTemp);
            set.Bind(lblHum).To(vm => vm.Weather.Currently.Hum);
            set.Bind(lblUv).To(vm => vm.Weather.Currently.UvIndex);
            set.Bind(lblVis).To(vm => vm.Weather.Currently.Vis);
            set.Bind(lblDew).To(vm => vm.Weather.Currently.Dew);
            set.Bind(lblPress).To(vm => vm.Weather.Currently.Press);

            set.Apply();
        }
예제 #14
0
 private void SetBinding(MvxFluentBindingDescriptionSet <LoadDataView, LoadDataViewModel> set)
 {
     set.Bind(this).For(pt => pt.Title).To(vm => vm.Title);
     set.Bind(_processTitle).For(pt => pt.Text).To(vm => vm.BusyText);
     set.Bind(_activityView).For(av => av.Hidden).To(vm => vm.IsBusy).WithConversion(new BusyViewModelToActivitryValueConverter());
     set.Bind(_okButton).For(ob => ob.Hidden).To(vm => vm.IsBusy);
     set.Bind(_okButton).For(ob => ob).To(vm => vm.ShowCategoriesCommand);
     set.Apply();
 }
예제 #15
0
        public override void LayoutSubviews()
        {
            base.LayoutSubviews();

            MvxFluentBindingDescriptionSet <ParkingTableCell, Parking> set = new MvxFluentBindingDescriptionSet <ParkingTableCell, Parking>(this);

            set.Bind(lblParking).To(res => res.description);
            set.Bind(lblPlaatsen).To(res => res.AvailablePlacesString);
            set.Apply();
        }
        public override void LayoutSubviews()
        {
            base.LayoutSubviews();

            MvxFluentBindingDescriptionSet <ChampionViewCell, Champion> set = new MvxFluentBindingDescriptionSet <ChampionViewCell, Champion>(this);

            set.Bind(NameLabel).To(a => a.Name);
            set.Bind(ImageView).For(iv => iv.Image).To(a => a.Image.LoadingScreenImage).WithConversion <StringToImageConverter>();
            set.Apply();
        }
예제 #17
0
        private void CreateBindings()
        {
            MvxFluentBindingDescriptionSet <MainView, MainViewModel> bindingSet = this.CreateBindingSet <MainView, MainViewModel>();

            bindingSet.Bind(Name).For(v => v.Text).To(vm => vm.NameText);
            bindingSet.Bind(Header).For(v => v.Text).To(vm => vm.HeaderText);
            //bindingSet.Bind(Description).For(v => v.Text).To(vm => vm.WantedPerson.DescriptionText);
            bindingSet.Bind(Image).For(v => v.Image).To(vm => vm.ImageURL).WithConversion(new StringToImageConverter());
            bindingSet.Apply();
        }
예제 #18
0
        public override void LayoutSubviews()
        {
            base.LayoutSubviews();
            MvxFluentBindingDescriptionSet <JobTableCell, Job> set = new MvxFluentBindingDescriptionSet <JobTableCell, Job>(this);

            set.Bind(TextLabel).To(job => job.Title);
            set.Bind(DetailTextLabel).To(job => job.Location.City);

            set.Apply();
        }
        public override void LayoutSubviews()
        {
            base.LayoutSubviews();

            MvxFluentBindingDescriptionSet <SkinViewCell, ChampionDetailSkins> set = new MvxFluentBindingDescriptionSet <SkinViewCell, ChampionDetailSkins>(this);

            set.Bind(NameLabel).To(a => a.Name);
            set.Bind(ImageView).For(iv => iv.Image).To(a => a.backgroundImage).WithConversion <StringToImageConverter>();
            set.Apply();
        }
예제 #20
0
        protected override void BindView()
        {
            MvxFluentBindingDescriptionSet <MenuView, MenuViewModel>
            bindingSet = this.CreateBindingSet <MenuView, MenuViewModel>();

            bindingSet.Bind(_menuHome.Tap()).For(v => v.Command).To(vm => vm.ShowHomeCommand);
            bindingSet.Bind(_menuSettings.Tap()).For(v => v.Command).To(vm => vm.ShowSettingsCommand);

            bindingSet.Apply();
        }
예제 #21
0
        public override void LayoutSubviews()
        {
            base.LayoutSubviews();

            MvxFluentBindingDescriptionSet <FavoriteViewCell, Favorites> set = new MvxFluentBindingDescriptionSet <FavoriteViewCell, Favorites>(this);

            set.Bind(TitleFavorite).To(res => res.name);
            set.Bind(SubtitleFavorite).To(res => res.description);
            set.Bind(ThumbnailPicture).For(img => img.Image).To(res => res.thumbnail).WithConversion <StringToImageConverter>();
            set.Apply();
        }
예제 #22
0
        private void SetBind()
        {
            MvxFluentBindingDescriptionSet <LoginViewController, LoginViewModel> set = this.CreateBindingSet <LoginViewController, LoginViewModel>();

            set.Bind(EnterYourEmail).To(vm => vm.UserEmail);
            set.Bind(EnterYourPasswordForLogin).To(vm => vm.UserPassword);
            set.Bind(LoginButton).To(vm => vm.UserLogin);
            set.Bind(RegistrationButton).To(vm => vm.UserRegistration);

            set.Apply();
        }
예제 #23
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            MvxFluentBindingDescriptionSet <JobDetailView, JobDetailViewModel> set = this.CreateBindingSet <JobDetailView, JobDetailViewModel>();

            set.Bind(lblTitle).To(vm => vm.Job.Title);
            set.Bind(lblDescription).To(vm => vm.Job.Description);
            set.Bind(lblAddress).To(vm => vm.Job.Location);
            set.Bind(lblPayment).To(vm => vm.Job.Payment);
            set.Bind(lblPhone).To(vm => vm.Job.ContactInfo.PhoneNumber);
            set.Bind(lblEmail).To(vm => vm.Job.ContactInfo.Email);
            set.Bind(btnOpenMaps).To(vm => vm.LaunchMapsCommand);
            set.Bind(lblDate).To(vm => vm.Job.PostTime).WithConversion <DateToStringConverter>();

            set.Apply();

            var myVM = this.ViewModel as JobDetailViewModel;

            if (myVM != null)
            {
                CLLocationCoordinate2D jobLocation = new CLLocationCoordinate2D(myVM.Job.Location.Lat, myVM.Job.Location.Lon);

                //permissie vragen aan gebruiker voor locatie
                CLLocationManager locationManager = new CLLocationManager();
                locationManager.RequestWhenInUseAuthorization();

                //map settings
                mapView.ZoomEnabled          = true;
                mapView.ScrollEnabled        = true;
                mapView.MultipleTouchEnabled = true;

                //center map
                MKCoordinateRegion mapRegion = MKCoordinateRegion.FromDistance(jobLocation, 500, 500);
                mapView.CenterCoordinate = jobLocation;
                mapView.Region           = mapRegion;

                //show userlocation
                mapView.ShowsUserLocation = true;

                //distance
                CLLocation jobLoc       = new CLLocation(jobLocation.Latitude, jobLocation.Longitude);
                var        distance     = locationManager.Location.DistanceFrom(jobLoc);
                string     distanceInKm = Math.Round((distance / 1000), 2).ToString() + " km";

                //show job location as annotation
                mapView.AddAnnotations(new MKPointAnnotation()
                {
                    Title      = myVM.Job.Title, //aanpassen met jobnaam
                    Subtitle   = distanceInKm,   //aanpassen met afstand
                    Coordinate = jobLocation
                });
            }
        }
예제 #24
0
        void Bind()
        {
            _bindingSet = this.CreateBindingSet <HomeViewController, HomeViewModel>();

            _bindingSet.Bind(_goToVectorButton).To(vm => vm.VectorCommand);
            _bindingSet.Bind(_goToFluentLayoutButton).To(vm => vm.FluentLayoutCommand);
            _bindingSet.Bind(_goToDelegateFunctionsButton).To(vm => vm.DelegateFunctionsCommand);
            _bindingSet.Bind(_showPluginAlertButton).To(vm => vm.PluginAlertCommand);
            _bindingSet.Bind(_showBaitSwitchAlertButton).To(vm => vm.BaitSwitchAlertCommand);

            _bindingSet.Apply();
        }
예제 #25
0
        public override void ViewDidLoad()
        {
            _parkingViewSource = new ParkingViewSource(this.TableView);
            base.ViewDidLoad();

            this.TableView.Source = _parkingViewSource;
            this.TableView.ReloadData();

            //Blauwe achtergrondkleur geven aan top bar
            this.NavigationController.NavigationBar.BarTintColor = UIColor.FromRGB(0, 159, 227);
            this.NavigationController.NavigationBar.Translucent  = false;

            //Kleur scheidingslijn
            this.TableView.SeparatorColor = UIColor.FromRGB(0, 159, 227);

            //Om de overige scheidingslijnen te verbergen
            this.TableView.TableFooterView = new UIView();

            //Tekstkleur in top bar ==> WIT
            UIStringAttributes textColor = new UIStringAttributes()
            {
                ForegroundColor = UIColor.White
            };

            this.NavigationController.NavigationBar.TitleTextAttributes = textColor;

            //Titel geven aan top bar
            this.Title = "Live Parking";

            MvxFluentBindingDescriptionSet <ParkingView, ParkingsViewModel> set = new MvxFluentBindingDescriptionSet <ParkingView, ParkingsViewModel>(this);

            //Lijst opvullen met Parkings
            set.Bind(_parkingViewSource).To(vm => vm.Parkings);

            //Code voor het selecteren van een rij
            set.Bind(_parkingViewSource)
            .For(scr => scr.SelectionChangedCommand)
            .To(vm => vm.ShowDetailCommand);


            //Code voor het refreshen (pull to refresh)
            var refreshControl = new MvxUIRefreshControl();

            this.RefreshControl      = refreshControl;
            refreshControl.TintColor = UIColor.FromRGB(0, 159, 227);

            set.Bind(refreshControl).For(r => r.IsRefreshing).To(vm => vm.IsBusy);
            set.Bind(refreshControl).For(r => r.RefreshCommand).To(vm => vm.ReloadCommand);


            set.Apply();
        }
예제 #26
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            MvxFluentBindingDescriptionSet <AddJobView, AddJobViewModel> set = new MvxFluentBindingDescriptionSet <AddJobView, AddJobViewModel>(this);

            set.Bind(txtTitle).To(vm => vm.Job.Title);
            set.Bind(txtDescription).To(vm => vm.Job.Description);
            set.Bind(txtPayment).To(vm => vm.Job.Payment);
            set.Bind(btnNext).To(vm => vm.Next);

            set.Apply();
        }
예제 #27
0
        private void SetBind()
        {
            MvxFluentBindingDescriptionSet <TaskListViewController, TaskListViewModel> set = this.CreateBindingSet <TaskListViewController, TaskListViewModel>();

            set.Bind(_source).To(m => m.TaskCollection);
            set.Bind(_source).For(v => v.SelectionChangedCommand).To(vm => vm.ShowTaskChangedView);
            set.Bind(_source).For(s => s.DeleteRowCommandiOS).To(vm => vm.DeleteItemCommandiOS);

            set.Bind(_refreshControl).For(r => r.IsRefreshing).To(vm => vm.IsRefreshTaskCollection);
            set.Bind(_refreshControl).For(r => r.RefreshCommand).To(vm => vm.RefreshTaskCommand);

            set.Apply();
        }
예제 #28
0
        public override void ViewDidLoad()
        {
            _restosTableViewSource = new RestosTableViewSource(this.TableView);
            base.ViewDidLoad();
            this.TableView.Source = _restosTableViewSource;
            this.TableView.ReloadData();
            MvxFluentBindingDescriptionSet <RestosTableView, RestosTableViewModel> set
                = new MvxFluentBindingDescriptionSet <RestosTableView, RestosTableViewModel>(this);

            set.Bind(_restosTableViewSource).To(vm => vm.RestosList);
            set.Bind(_restosTableViewSource).For(src => src.SelectionChangedCommand).To(vm => vm.NavigateToDetailCommand);
            set.Apply();
        }
예제 #29
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();
            MvxFluentBindingDescriptionSet <LoginView, LoginViewModel> set = new MvxFluentBindingDescriptionSet <LoginView, LoginViewModel>(this);

            set.Bind(txtPassword).To(vm => vm.Password);
            set.Bind(txtUsername).To(vm => vm.Username);
            set.Bind(btnLogin).To(vm => vm.LoginCommand);
            set.Bind(lblErrorMessage).To(vm => vm.Error);
            set.Bind(btnRegister).To(vm => vm.RegisterCommand);

            set.Apply();
        }
예제 #30
0
        private void SetBind()
        {
            MvxFluentBindingDescriptionSet <RegistrationViewController, RegistrationViewModel> set = this.CreateBindingSet <RegistrationViewController, RegistrationViewModel>();

            set.Bind(UserName).To(vm => vm.RegistrationUserName);
            set.Bind(UserEmail).To(vm => vm.RegistrationEmail);
            set.Bind(EnterUserPassword).To(vm => vm.RegistrationUserPassword);
            set.Bind(EnterConfirm).To(vm => vm.RegistrationUserPasswordConfirm);
            set.Bind(RegistrationButton).To(vm => vm.UserRegistrationCommand);
            set.Bind(BackButton).To(vm => vm.BackViewCommand);

            set.Apply();
        }