Search code examples
wpfuser-controlsfocus

UserControl, cursor at tabnavigation


In my window there are two textbox and my usercontrol.

1

Once the cursor is TextBox1. When I click Tab cursor is in my UserControl, but cursor remains stable on TextBox(like | without blink). When I click next Tab cursor only in TextBox2. If I move cursor from TextBox1 to my usercontrol - all right. The problem is in my component, but I don't know what it is.


Solution

  • Manually set

    • TabIndex of TextBox1 to 1;
    • TabIndex of TextBoxinUserControl to 2;
    • TabIndex of TextBox2 to 3

    `