public MeetingCellHeaderView(GroupedMeetingViewModel vm) { BackgroundColor = ApplicationColors.CellHeaderBackgroundColor; //var blur = UIBlurEffect.FromStyle(UIBlurEffectStyle.ExtraDark); //var blurView = new UIVisualEffectView(blur); //blurView.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight; //AddSubview(blurView); //blurView.Frame = Frame; Label = new UILabel(); Label.Text = vm.DateFormated; Label.TextAlignment = UITextAlignment.Left; Label.TextColor = ApplicationColors.CellHeaderForegroundColor; Label.Font = Label.Font.WithSize(12); nfloat hmargin = 15; this.AddSubviews(Label); if (vm.IsNow) { //TODO : changer la couleur de fond et la couleur de font } this.SubviewsDoNotTranslateAutoresizingMaskIntoConstraints(); this.AddConstraints( Label.WithSameWidth(this).Minus(hmargin), Label.WithSameHeight(this), Label.WithSameCenterX(this), Label.WithSameCenterY(this) ); }
public MeetingCellHeaderView(GroupedMeetingViewModel vm) { BackgroundColor = ApplicationColors.CellHeaderBackgroundColor; Label = new UILabel(); Label.Text = vm.DateFormated; Label.TextAlignment = UITextAlignment.Left; Label.TextColor = ApplicationColors.CellHeaderForegroundColor; Label.Font = UIFont.FromName(ApplicationStyle.TitleFontName, ApplicationStyle.TitleSectionCellFontSize); nfloat hmargin = 15; this.AddSubviews(Label); if (vm.IsNow) { //TODO : changer la couleur de fond et la couleur de fond } this.SubviewsDoNotTranslateAutoresizingMaskIntoConstraints(); this.AddConstraints( Label.WithSameWidth(this).Minus(hmargin), Label.WithSameHeight(this), Label.WithSameCenterX(this), Label.WithSameCenterY(this) ); }