private void textBox1_PreviewTextInput(object sender, TextCompositionEventArgs e) { e.Handled = TheTool.IsTextNumeric(e.Text); }