public StudentIDPage() { InitializeComponent(); InitializeQuickPickList(); SubmitButton.IsEnabled = false; StudentNumberTextBox.Focus(); }
// Constructors /////////////////////////////////////////////////////////////////////// /// <summary> /// Default Constructor /// </summary> public StudentIDPage() { InitializeComponent(); m_bIsAdmin = false; m_bIsQuickPick = false; SubmitButton.IsEnabled = false; //Disable submit button StudentNumberTextBox.Focus(); //Focus on the textbox }
/// <summary> /// Event handler for when the textbox is focused. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void StudentNumberTextBox_GotFocus(object sender, RoutedEventArgs e) { //Select all text within the textbox in order to rewrite entry StudentNumberTextBox.SelectAll(); }
//grabs all text in the text box //incase customer thinks they did it wrong and then //wants to go back, it will highlight all of the text //woot woot for usability features private void StudentNumberTextBox_GotFocus(object sender, RoutedEventArgs e) { StudentNumberTextBox.SelectAll(); }