private void OnTextChange(object sender, TextCompositionEventArgs e) { e.Handled = !GenericHelpers.IsTextAllowed(e.Text); }