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

Remove rounded corners of UITextField

$
0
0

Hi! I want to remove the rounded corners of a UITextField using a custom renderer

public class CustomEntryRenderer:EntryRenderer
{
    protected override void OnElementChanged (ElementChangedEventArgs<Entry> e)
    {
        base.OnElementChanged (e);
        if (e.OldElement == null) {   // perform initial setup
            var nativeTextField = (UITextField) Control;
            nativeTextField.Layer.CornerRadius = 0f;
        }
    }
}

The corners remain rounded not squared! What I am doing wrong?


Viewing all articles
Browse latest Browse all 77050

Trending Articles



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