BorderlessEntryRenderer.cs 604 Bytes
Newer Older
Paolo Pecis's avatar
Paolo Pecis committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
using UIKit;
using Xamarin.Forms;
using Xamarin.Forms.Platform.iOS;

[assembly: ExportRenderer(typeof(XAMARINChangeFocus.Controls.BorderlessEntry), typeof(XAMARINChangeFocus.iOS.BorderlessEntryRenderer))]

namespace XAMARINChangeFocus.iOS
{
    public class BorderlessEntryRenderer : EntryRenderer
    {
        protected override void OnElementChanged(ElementChangedEventArgs<Entry> e)
        {
            base.OnElementChanged(e);
            if (this.Control != null)
            {
                this.Control.BorderStyle = UITextBorderStyle.None;
            }
        }
    }
}