I need my text box to accept only number with one decimal point. I created a function to accept only numeric value. Now I need a help for accept only one decimal point:
private void txtOpenBal_PreviewTextInput(object sender, TextCompositionEventArgs e)
{
foreach (char ch in e.Text)
if (!(Char.IsDigit(ch) || ch.Equals('.')))
{
e.Handled = true;
}
}
It accept more than one decimal point