private void textBoxNumeric_PreviewTextInput(object sender, TextCompositionEventArgs e) { e.Handled = !this.isNumericInput(e.Text); }