private void UpdateLineColor() { var entryEx = Element as EntryEx; if (entryEx == null) { return; } Control.Bounds = new CGRect(0, 0, entryEx.Width, entryEx.Height); if (entryEx.BottomLineColor != Color.Default) { BorderLineLayer lineLayer = Control.Layer.Sublayers.OfType <BorderLineLayer>() .FirstOrDefault(); if (lineLayer == null) { lineLayer = new BorderLineLayer(); lineLayer.MasksToBounds = true; lineLayer.BorderWidth = 1.0f; Control.Layer.AddSublayer(lineLayer); Control.BorderStyle = UITextBorderStyle.None; } lineLayer.Frame = new CGRect(0f, Control.Frame.Height - 1f, Control.Bounds.Width, 1f); lineLayer.BorderColor = entryEx.BottomLineColor.ToCGColor(); Control.TintColor = Control.TextColor; } }
private void UpdateLineColor() { BorderLineLayer lineLayer = control.Layer.Sublayers.OfType <BorderLineLayer>() .FirstOrDefault(); if (lineLayer == null) { lineLayer = new BorderLineLayer(); lineLayer.MasksToBounds = true; lineLayer.BorderWidth = 1.0f; control.Layer.AddSublayer(lineLayer); control.BorderStyle = UITextBorderStyle.None; } lineLayer.Frame = new CGRect(0f, Control.Frame.Height - 1f, Control.Bounds.Width, 1f); lineLayer.BorderColor = LineColorEffect.GetLineColor(Element).ToCGColor(); control.TintColor = control.TextColor; }
private void UpdateLineColor() { var lineLayer = _control.Layer.Sublayers.OfType <BorderLineLayer>().FirstOrDefault(); if (lineLayer == null) { lineLayer = new BorderLineLayer { MasksToBounds = true, BorderWidth = 1.0f }; _control.Layer.AddSublayer(lineLayer); _control.BorderStyle = UITextBorderStyle.None; } lineLayer.Frame = new CGRect(0f, Control.Frame.Height - 1f, Control.Bounds.Width, 1f); lineLayer.BorderColor = _entry.LineColorToApply.ToCGColor(); _control.TintColor = _control.TextColor; }