protected override void OnElementChanged(ElementChangedEventArgs <Xamarin.Forms.Button> e) { base.OnElementChanged(e); if (e.NewElement != null) { if (Control == null) { SetNativeControl(new Goui.Html.Button()); Debug.Assert(Control != null, "Control != null"); Control.AddClassName = "btn btn-primary"; _buttonTextColorDefaultNormal = Goui.Colors.Black; _buttonTextColorDefaultHighlighted = Goui.Colors.Black; _buttonTextColorDefaultDisabled = Goui.Colors.Black; Control.Click += OnButtonTouchUpInside; } UpdateText(); UpdateFont(); UpdateBorder(); UpdateImage(); UpdateTextColor(); } }
public static Color ToGouiColor(this Xamarin.Forms.Color color, Goui.Color defaultColor) { if (color == Xamarin.Forms.Color.Default) { return(defaultColor); } return(ToGouiColor(ref color)); }
protected override void SetBackgroundColor(Xamarin.Forms.Color color) { if (Element == null) { return; } _colorToRenderer = Element.Color.ToGouiColor(Colors.Clear); Style.BackgroundColor = _colorToRenderer; }