I have a WPF window which is divided into two portions. One portion contains itemscontrol which generate textboxes depedning on observable collection binding in ViewModel.
The other portion of window has a content control which loads a usercontrol using datatemplate and viewmodel binding. Also that user control has buttons on it.
The problem is i want to keep keyboard focus within the textboxes in itemscontrol at all times and don't want the keyboard focus to shift to the usercontrol button even if they are pressed.
Currently the keyboardfocus shift from the text boxes to the usercontrol buttons when the button is pressed.
Is there a way i can keep keyboard focus in textbox in itemscontrol.