コード例 #1
0
 /// <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();
 }
コード例 #2
0
 //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();
 }