I have a tabcontrol in WPF When I switch to a specific tabItem , I want to set the focus on a specific textBox
I added the code of textBox_n.Focus(); in the event handler of selectionChanged, but it didn't work.
I added the code in the event handler of the tabItem's GotFocus, but funny enough calling textBox_n.Focus(), was calling the tabItem's GotFocus again.
so where and what the best place to put it.