private void SetPressedBackgroundColor(ExtendedButton extendedButton) { if (extendedButton.PressedBackgroundColor != Color.Default) { var pressed = UIColorExtensions.GetImageFromColor(extendedButton.PressedBackgroundColor.ToUIColor()); this.Control.SetBackgroundImage(pressed, UIControlState.Highlighted); this.Control.SetBackgroundImage(pressed, UIControlState.Selected); this.Control.ClipsToBounds = true; } }
private void SetDisabledBackgroundColor(ExtendedButton extendedButton) { if (extendedButton.DisabledBackgroundColor != Color.Default) { var disabled = UIColorExtensions.GetImageFromColor(extendedButton.DisabledBackgroundColor.ToUIColor()); if (extendedButton.BackgroundColor != Color.Transparent) { this.Control.Layer.BorderColor = UIColor.Clear.CGColor; } this.Control.SetBackgroundImage(disabled, UIControlState.Disabled); } }