WPF TabControl On SelectionChanged, set focus to a text field WPF TabControl On SelectionChanged, set focus to a text field wpf wpf

WPF TabControl On SelectionChanged, set focus to a text field


Try putting the .Focus() calls inside a dispatcher.BeginInvoke.

Dispatcher.BeginInvoke(new Action(() => { txtsvc.Focus(); }));