Ejemplo n.º 1
0
 private void SetupBindings()
 {
     this.DelayBind(() =>
     {
         var set = this.CreateBindingSet <HeaderImageCell, HeaderImage>();
         set.Bind(_background).For("ImageUrl").To(vm => vm.Image).WithConversion("ImageUrl");
         set.Bind(_title.Tap()).For(tap => tap.Command).To(vm => vm.SelectedCommand);
         set.Bind(ContentView.Tap()).For(tap => tap.Command).To(vm => vm.SelectedCommand);
         set.Bind(_background.Tap()).For(tap => tap.Command).To(vm => vm.SelectedCommand);
         set.Bind(_title).To(vm => vm.TitleText);
         set.Apply();
     });
 }
 private void SetupBindings()
 {
     this.DelayBind(() =>
     {
         var set = this.CreateBindingSet <EventCategoryDoubleCell, EventCategoryDouble>();
         set.Bind(_background1).For("ImageUrl").To(vm => vm.Image1).WithConversion("ImageUrl");
         set.Bind(_title1).To(vm => vm.Title1);
         set.Bind(_background1.Tap()).For(t => t.Command).To(vm => vm.Image1Command);
         set.Bind(_background2).For("ImageUrl").To(vm => vm.Image2).WithConversion("ImageUrl");
         set.Bind(_title2).To(vm => vm.Title2);
         set.Bind(_background2.Tap()).For(t => t.Command).To(vm => vm.Image2Command);
         set.Apply();
     });
 }