xamarin.ios - Xamarin Numeric only field -


View in my XMERIN forms I have entry control, which I have added,

  myEntry.Keyboard = Keyboard.Numeric;  

To make it a decimal only.

This code will accept only one decimal point at any time in Android device.

However in iOS, it accepts many decimal points ?? Is there any way that I can limit only one decimal point in iOS.

You have Xamarin.Forms entry

You are given both old text string . and new text string value.

Then you can count on the number of decimal digits in the new text , check to see if it more than 1 .

If it is, then just Entry.Text will be old value and after that you will only have one decimal point.


Comments