protected ProspectViewCell(IntPtr handle) : base(handle) { _imageControl = new MvxCachedImageView(); ContentView.AddSubview(_imageControl); ContentView.SubviewsDoNotTranslateAutoresizingMaskIntoConstraints(); SetNeedsUpdateConstraints(); // Note: this .ctor should not contain any initialization logic. this.DelayBind(() => { var e = new Environment_iOS(); var theme = e.GetOperatingSystemTheme(); var set = this.CreateBindingSet <ProspectViewCell, Prospect>(); set.Bind(ProspectLabel).To(v => v.Name); set.Bind(ProspectLabel).For(v => v.TextColor).To(v => v).WithConversion("ProspectColor", theme); set.Bind(CommunityLabel).To(v => v.ProspectCommunity.Community.Description); set.Bind(SalespersonLabel).To(v => v.ProspectCommunity.SalespersonName); set.Bind(SystemActivityLabel).To(v => v.ProspectCommunity.SystemActivityDate).WithConversion(new DateOnlyConverter()); set.Bind(DayCountLabel).To(v => v.ProspectCommunity).WithConversion(new DayCountConverter()); //set.Bind(this).For(u => u.BackgroundColor).To(v => v).WithConversion(new ProspectBackgroundColorValueConverter()); set.Bind(_imageControl).For(i => i.ImagePath).To(v => v.ProspectCommunity.SalespersonAddressNumber).WithConversion(new ImageValueConverter()); set.Apply(); }); }
protected SMSInboxViewCell(IntPtr handle) : base(handle) { // Note: this .ctor should not contain any initialization logic this.DelayBind(() => { UnreadCountLabel.TextAlignment = UITextAlignment.Center; UnreadCountLabel.TextColor = UIColor.White; UnreadCountLabel.Layer.CornerRadius = UnreadCountLabel.Frame.Width / 2; UnreadCountLabel.Layer.BorderWidth = (nfloat)3.0; UnreadCountLabel.Layer.MasksToBounds = true; UnreadCountLabel.TranslatesAutoresizingMaskIntoConstraints = false; var e = new Environment_iOS(); var theme = e.GetOperatingSystemTheme(); var set = this.CreateBindingSet <SMSInboxViewCell, SmsActivity>(); set.Bind(UnreadCountLabel).To(v => v.UnreadCount); set.Bind(NameLabel).To(v => v.Prospect.Name); set.Bind(DateLabel).To(v => v.UpdatedDate).WithConversion(new ElapsedTimeConverter()); set.Bind(CommunityLabel).To(v => v.Prospect.ProspectCommunity.Community.Description); set.Bind(MessageLabel).To(v => v.MessageBody); //set.Bind(this).For(u => u.BackgroundColor).To(v => v).WithConversion("QuestionBackground", theme); set.Apply(); }); }
protected QuestionViewCell(IntPtr handle) : base(handle) { // Note: this .ctor should not contain any initialization logic. this.DelayBind(() => { var e = new Environment_iOS(); var theme = e.GetOperatingSystemTheme(); var set = this.CreateBindingSet <QuestionViewCell, TrafficCardResponse>(); set.Bind(QuestionLabel).To(v => v.TrafficCardQuestion.QuestionText); set.Bind(AnswerLabel).To(v => v.AnswerText); set.Bind(this).For(u => u.BackgroundColor).To(v => v).WithConversion("QuestionBackground", theme); set.Bind(QuestionLabel).For(u => u.TextColor).To(v => v).WithConversion("QuestionTextColor", theme); set.Bind(AnswerLabel).For(u => u.TextColor).To(v => v).WithConversion(new QuestionTextColorValueConverter()); set.Apply(); }); }