示例#1
0
        public static void ApplyCornerRadius(this UIButton @this, XPlatCornerRadius cornerRadius)
        {
            if (@this == null || cornerRadius == null)
            {
                return;
            }

            @this.ApplyCornerRadius(GetRectCorners(cornerRadius), cornerRadius.Radius);
        }
示例#2
0
        public static void ApplyStyle(this
                                      UIButton
                                      @this, XPlatButtonStyle buttonStyle)
        {
            if (@this == null || buttonStyle == null)
            {
                return;
            }

            @this.ApplyStyle((XPlatLabelStyle)buttonStyle);

            @this.ApplyBackgroundColor(buttonStyle.BackgroundColor);
            //@this.ApplyBackgroundImage(buttonStyle.BackgroundImage);
            @this.ApplyCornerRadius(buttonStyle.CornerRadius);
            @this.ApplyBorderColor(buttonStyle.BorderColor, cornerRadius: buttonStyle.CornerRadius);
        }