Exemple #1
0
 void SetFontSize(CustumEntry view)
 {
     if (view.FontSize != Font.Default.FontSize)
     {
         Control.Font = UIFont.SystemFontOfSize((System.nfloat)view.FontSize);
     }
     else if (view.FontSize == Font.Default.FontSize)
     {
         Control.Font = UIFont.SystemFontOfSize(17f);
     }
 }
Exemple #2
0
 void SetPlaceholderTextColor(CustumEntry 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;
     }
 }
Exemple #3
0
        void DrawBorder(CustumEntry 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   = 1.0f;

            Control.Layer.AddSublayer(borderLayer);
            Control.BorderStyle = UITextBorderStyle.None;
        }