Exemplo n.º 1
0
        protected override void OnElementChanged(ElementChangedEventArgs <Xamarin.Forms.Button> e)
        {
            base.OnElementChanged(e);

            if (Control != null)
            {
                Control.SetBackgroundColor(Android.Graphics.Color.Gray);
                FiapButton fiapButton = (FiapButton)Element;

                fiapButton.Text = fiapButton.Texto;
            }
        }
Exemplo n.º 2
0
        protected override void OnElementChanged(ElementChangedEventArgs <Xamarin.Forms.Button> e)
        {
            base.OnElementChanged(e);

            FiapButton fiapButton = (FiapButton)Element;

            //TODO: Create a Native Button, set it's text and Redraw the object

            if (Control != null)
            {
                Control.SetBackgroundColor(Android.Graphics.Color.Gray);
            }
        }
        public override void Draw(Canvas canvas)
        {
            base.Draw(canvas);

            FiapButton btn = (FiapButton)Element;

            Rect ret = new Rect();

            GetDrawingRect(ret);
            Paint paint = new Paint();

            canvas.DrawText(btn.Texto, 0, 0, paint);
        }
Exemplo n.º 4
0
        protected override void OnElementChanged(ElementChangedEventArgs <Xamarin.Forms.Button> e)
        {
            base.OnElementChanged(e);

            FiapButton Buttom = (FiapButton)Element;



            if (Control != null)
            {
                Control.SetBackgroundColor(Android.Graphics.Color.Gray);

                Buttom.Text            = Buttom.Texto;
                Buttom.FontSize        = 2.0;
                Buttom.BackgroundColor = Color.Aqua;
            }
        }
Exemplo n.º 5
0
        protected override void OnElementChanged(ElementChangedEventArgs <Xamarin.Forms.Button> e)
        {
            base.OnElementChanged(e);

            if (Control != null)
            {
                Control.SetBackgroundColor(Android.Graphics.Color.Gray);

                FiapButton fiapButton = (FiapButton)Element;

                string texto = (string)fiapButton.Texto;

                Control.Text = texto;

                //Control.SetText(texto, Android.Widget.TextView.BufferType.Spannable);
            }
        }