private void ProductKeyTxtBox_TextChanged(object sender, EventArgs e) { int length = ProductKeyTxtBox.TextLength; if (length == ProductKeyTxtBox.MaxLength) { VerifyBtn.Select(); } }
private void MainWindow_OnKeyDown(object sender, KeyEventArgs e) { #if DEBUG switch (e.Key) { case Key.NumPad0: break; case Key.Enter when LicenseTextBox.IsFocused: VerifyBtn.RaiseEvent(new RoutedEventArgs(ButtonBase.ClickEvent)); break; } #endif }