0

How to replace character "," to "." on keyboard when focus on Entry Field on Xamarin Forms? I find way replace "Next" to "Done" on keyboard.

Change return to be next/done key in Xamarin Forms Shared Project

Don't know that can replace "," to "." when focus Entry (with display keyboard is "Numeric"):

Image

If you know it on Android and iOS, you can help me!

Please help me! Tks!

Huu Bao Nguyen
  • 1,051
  • 2
  • 14
  • 40

1 Answers1

3

You don't need to go through this stress at all. Since you have the keyboard changed to numeric, simply let the OS determine the layout.

Now when you get the Entry.Text, simply replace the occurrences of (,) to (.). To make it real-time, do this in the Entry.TextChanged Event.

Entry.Text?.Replace(',', '.');

Hope this helps.

waletoye
  • 364
  • 2
  • 9