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; } }
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); }
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; } }
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); } }