Ejemplo n.º 1
0
 void SetPlaceholderTextColor(Common.LineEntry view)
 {
     if (string.IsNullOrEmpty(view.Placeholder) == false && view.PlaceholderColor != Color.Default)
     {
         var placeholderString = new NSAttributedString(view.Placeholder,
                                                        new UIStringAttributes {
             ForegroundColor = view.PlaceholderColor.ToUIColor()
         });
         Control.AttributedPlaceholder = placeholderString;
     }
 }
Ejemplo n.º 2
0
        void DrawBorder(Common.LineEntry view)
        {
            var borderLayer = new CALayer();

            borderLayer.MasksToBounds = true;
            borderLayer.Frame         = new CoreGraphics.CGRect(0f, Frame.Height / 2, Frame.Width, 1f);
            borderLayer.BorderColor   = view.BorderColor.ToCGColor();
            borderLayer.BorderWidth   = 0.5f;

            Control.Layer.AddSublayer(borderLayer);
            Control.BorderStyle = UITextBorderStyle.None;
        }
Ejemplo n.º 3
0
        void SetFontSize(Common.LineEntry view)
        {
            double EPS = 1e-9;

            if (System.Math.Abs(view.FontSize - Font.Default.FontSize) > EPS)
            {
                Control.Font = UIFont.SystemFontOfSize((System.nfloat)view.FontSize);
            }
            else if (System.Math.Abs(view.FontSize - Font.Default.FontSize) < EPS)
            {
                Control.Font = UIFont.SystemFontOfSize(17f);
            }
        }