I think that any business application should select all the text in a TextBox when the user tabs into it. Your advanced users that take advantage of the tab key will appreciate it. In WinForms 2.0, the best way of accomplishing this was to create a new control that inherited from TextBox that implemented SelectAll functionality and use your new control instead of the normal TextBox.
In WPF, this is much easier. In the App.xaml.cs, override the OnStartup method and use the EventManager.RegisterClassHandler to listen to the GotFocusEvent of every TextBox:
protected override void OnStartup(StartupEventArgs e)
{
EventManager.RegisterClassHandler(typeof(TextBox),
TextBox.GotFocusEvent,
new RoutedEventHandler(TextBox_GotFocus));
base.OnStartup(e);
}
void TextBox_GotFocus(object sender, RoutedEventArgs e)
{
(sender as TextBox).SelectAll();
}
If you want to override this behavior for a specific TextBox, just point the GotFocus event to a method like this:
void NoSelectTextBox_GotFocus(object sender, RoutedEventArgs e)
{
(sender as TextBox).Select(0, 0);
}