I thought the text field has a property in which you can set the input to what is being inserted. Although I currently cannot verify this.
otherwise, as an alternative, you might try to parse your input into double when sending the value. Sort of:
double myDouble; try { myDouble = double.parse(textbox.Text) } catch (Exception e) { MessageBox.Show("Input is incorrect", "Error") }
this is probably not the best workaround, but it may just do the trick.
source share