I have a user control that consists of a CheckBox and a TextBox. I create instances of this user control dynamically at runtime according to properties of my object and add them into a StackPanel.
I would like to enable Tab navigation between these TextBoxes. Setting IsTabStop=”True” for the TextBox in the user control did not worked. I have also set KeyboardNavigation.TabNavigation=”Contained” for TextBox but not succeeded.
I found the solution:
Set KeyBoardNavigation property of the container not the TextBox. I do this in code behind because I create my StackPanel instances dynamically.
Also make sure TextBox has IsTabStop property set True: