private void Initialize() { BackgroundView = new CustomCellBackgroundView(this.ContentView.Frame, 10, UIColor.White, UIColor.FromRGB(190, 190, 190)) { HideBottomBar = HideBottomBar, }; TextLabel.TextColor = UIColor.FromRGB(44, 44, 44); TextLabel.BackgroundColor = UIColor.Clear; TextLabel.Font = UIFont.FromName(FontName.HelveticaNeueBold, 28 / 2); TextLabel.TextAlignment = UITextAlignment.Natural; DetailTextLabel.TextColor = UIColor.FromRGB(44, 44, 44); DetailTextLabel.BackgroundColor = UIColor.Clear; DetailTextLabel.Font = UIFont.FromName(FontName.HelveticaNeueLight, 28 / 2); DetailTextLabel.TextAlignment = UITextAlignment.Natural; ContentView.BackgroundColor = UIColor.Clear; BackgroundColor = UIColor.Clear; if (this.Accessory != UITableViewCellAccessory.None) { _arrowImage = new UIImageView(new CGRect(0, 0, 8, 13)); _arrowImage.BackgroundColor = UIColor.Clear; _arrowImage.ContentMode = UIViewContentMode.ScaleAspectFit; _arrowImage.Image = UIImage.FromFile("right_arrow.png"); _arrowImage.Hidden = true; AccessoryView = _arrowImage; } }
public PanelMenuCell(string cellIdentifier, string bindingText) : base(bindingText, UITableViewCellStyle.Default, new NSString(cellIdentifier), UITableViewCellAccessory.None) { BackgroundColor = UIColor.Clear; // this color is added on top of the menu color // 0.04 value for alpha was obtained by a picky client wanting a specific selected color var selectedColorDelta = Theme.ShouldHaveLightContent(Theme.MenuColor) ? UIColor.White.ColorWithAlpha(0.04f) : UIColor.Black.ColorWithAlpha(0.04f); BackgroundView = new CustomCellBackgroundView(Frame, LeftPadding, UIColor.Clear, selectedColorDelta); SelectionStyle = UITableViewCellSelectionStyle.None; Accessory = UITableViewCellAccessory.None; TextLabel.Font = UIFont.FromName(FontName.HelveticaNeueLight, 36 / 2); TextLabel.TextColor = Theme.ShouldHaveLightContent(Theme.MenuColor) ? UIColor.White : UIColor.FromRGB(79, 76, 71); }
private void Initialize() { this.DelayBind(() => { var set = this.CreateBindingSet <ToggleCell, ToggleItem> (); set.Bind(NotificationToggle) .For(v => v.On) .To(vm => vm.Value); set.Bind(TextLabel) .To(vm => vm.Display); set.Apply(); }); BackgroundView = new CustomCellBackgroundView(this.ContentView.Frame, 0, UIColor.White, UIColor.FromRGB(190, 190, 190)) { HideBottomBar = HideBottomBar, }; ContentView.BackgroundColor = UIColor.Clear; BackgroundColor = UIColor.Clear; TextLabel.TextColor = UIColor.FromRGB(44, 44, 44); TextLabel.BackgroundColor = UIColor.Clear; TextLabel.Font = UIFont.FromName(FontName.HelveticaNeueLight, 32 / 2); TextLabel.TextAlignment = UITextAlignment.Natural; ContentView.BackgroundColor = UIColor.Clear; BackgroundColor = UIColor.Clear; if (this.Accessory != UITableViewCellAccessory.None) { NotificationToggle = new UISwitch(); AccessoryView = NotificationToggle; } }