Exemplo n.º 1
0
        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();
            }
        }
Exemplo n.º 2
0
 public static Color ToGouiColor(this Xamarin.Forms.Color color, Goui.Color defaultColor)
 {
     if (color == Xamarin.Forms.Color.Default)
     {
         return(defaultColor);
     }
     return(ToGouiColor(ref color));
 }
Exemplo n.º 3
0
        protected override void SetBackgroundColor(Xamarin.Forms.Color color)
        {
            if (Element == null)
            {
                return;
            }

            _colorToRenderer = Element.Color.ToGouiColor(Colors.Clear);

            Style.BackgroundColor = _colorToRenderer;
        }