I have tried the below code to select all text in textbox when focus. But this is not working.
XAML:
You could use the dispatcher:
private void TextBox_GotFocus(object sender, RoutedEventArgs e) { TextBox textBox = (TextBox)sender; textBox.Dispatcher.BeginInvoke(new Action(() => textBox.SelectAll())); }