private void TextBox_PreviewKeyDown(object sender, KeyEventArgs e) { if (e.Key == Key.Enter) { TxtBox1.MoveFocus(new TraversalRequest(FocusNavigationDirection.Next)); } }
private void Limpiar() { TxtBox1.Clear(); TxtBox2.Clear(); TxtBox3.Clear(); TxtBox4.Clear(); TxtBox5.Clear(); }
/// <summary> /// Méthode de rénitialisation de la fenetre /// </summary> private void Renitialisation() { MessageBox.Show("Le pokémon " + TxtBox1.Text + " est enregistré avec succès. \n", "Enregistrement"); //Rénitialiser le tout TxtBox1.Clear(); TxtBox2.Clear(); TxtBox3.Clear(); ComboBox1.SelectedItem = null; CheckedListBox1.SelectedItem = null; RadioBtn1.Checked = false; RadioBtn2.Checked = false; CheckBox1.Checked = false; Lbl6.Enabled = false; TxtBox3.Enabled = false; foreach (int i in CheckedListBox1.CheckedIndices) { CheckedListBox1.SetItemCheckState(i, CheckState.Unchecked); } }
private void TxtBox1_TextChanged(object sender, System.Windows.Controls.TextChangedEventArgs e) { TxtBox1.CaretIndex = TxtBox1.Text.Length; TxtBox1.ScrollToEnd(); }