コード例 #1
0
 public static void ApplyBackgroundColor(this UIButton @this, XPlatColor color)
 {
     if (@this == null || color == null)
     {
         return;
     }
     @this.BackgroundColor = color.ToNative();
 }
コード例 #2
0
 public static void ApplyTextColor(this UIButton @this, XPlatColor color)
 {
     if (@this == null || color == null)
     {
         return;
     }
     @this.SetTitleColor(color.ToNative(), UIControlState.Normal);
 }
コード例 #3
0
 public static void ApplyTextColor(this UILabel @this, XPlatColor color)
 {
     if (@this == null || color == null)
     {
         return;
     }
     @this.TextColor = color.ToNative();
 }
コード例 #4
0
        public static void ApplyBorderColor(this UIView @this, XPlatColor color, int size = 1, XPlatCornerRadius cornerRadius = null)
        {
            if (@this == null || color == null)
            {
                return;
            }

            if (cornerRadius == null)
            {
                cornerRadius = new XPlatCornerRadius(5);
            }

            @this.ApplyBorder(GetRectCorners(cornerRadius), cornerRadius?.Radius ?? 0, color.ToNative(), (float)size);
        }