I know the Xamarin.Android code, but how about Xamarin.IOS?
Xamarin.Android code:
public class CustomNumEntry : EntryRenderer
{
public CustomNumEntry(Context context) : base(context)
{
}
protected override void OnElementChanged(ElementChangedEventArgs<Entry> e)
{
base.OnElementChanged(e);
if (this.Control != null)
{
Control.SetPadding(10, 0, 0, 15);
Control.InputType = Android.Text.InputTypes.ClassNumber | Android.Text.InputTypes.NumberFlagSigned | Android.Text.InputTypes.NumberFlagDecimal;
Control.TextAlignment = Android.Views.TextAlignment.Center;
}
if (e.OldElement == null)
{
var nativeEditText = (global::Android.Widget.EditText)Control;
nativeEditText.SetSelectAllOnFocus(true);
}
}
}