반응형
<TextBox GotFocus="TextBox_GotFocus" ... / >
using System.Windows.Threading; private void TextBox_GotFocus(object sender, RoutedEventArgs e) { Dispatcher.CurrentDispatcher.BeginInvoke ( DispatcherPriority.ContextIdle, new Action ( delegate { (sender as TextBox).SelectAll(); } ) ); } |
출처: https://shine10e.tistory.com/60 [열이 Blog : )]