private void Window_KeyUp(object sender, KeyEventArgs e) { if (e.Key == Key.Escape) { Close(); } else if (e.Key == Key.Up && Pass_Txt.IsFocused) { User_Txt.Focus(); } else if (e.Key == Key.Down) { if (User_Txt.IsFocused) { Pass_Txt.Focus(); } else if (Pass_Txt.IsFocused) { Insert_CheckBox.Focus(); } } }
public AddUser() { InitializeComponent(); User_Txt.Focus(); }