soarinblue
0
Q:

textbox gotfocus wpf

private void tb_GotFocus(object sender, RoutedEventArgs e)
{
  TextBox tb = sender as TextBox;
  if (tb != null) {
    tb.SelectAll(); //select all text in TextBox
  }
}
0
<TextBox Name="tb"
         GotFocus="tb_GotFocus" />
0

New to Communities?

Join the community