📜  文本框 gotfocus wpf - C# 代码示例

📅  最后修改于: 2022-03-11 14:49:14.205000             🧑  作者: Mango

代码示例2
private void tb_GotFocus(object sender, RoutedEventArgs e)
{
  TextBox tb = sender as TextBox;
  if (tb != null) {
    tb.SelectAll(); //select all text in TextBox
  }
}