Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

How to show entry border onFocus?

$
0
0

Here i am using this code for setting entry border using renderer:

 protected override void OnElementChanged(ElementChangedEventArgs<Entry> e)
        {
            base.OnElementChanged(e);
            //Control?.SetBackgroundColor(Android.Graphics.Color.Transparent);

            if (Control != null)
            {
                var gd = new GradientDrawable();
                gd.SetStroke(2, Android.Graphics.Color.Purple);
                Control.SetPadding(10, 10, 10, 10);
                Control.SetBackground(gd);  
            }
            else
            {

            }
        }

i want to show the border with shadow only onFocus? how to do this?


Viewing all articles
Browse latest Browse all 77050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>