locked
how to programmatically move to next control?

    Question

  • Hi,

    Imagine that there's a TextBox within the custom control. I would like to programmatically move focus to that TextBox.

    In this case, I can't get a reference to those control, there's no way for me to do that. Or How to simulate Keyboard's Tab in C#?

    Thanks and Best Regards,

    Weera

    Wednesday, November 5, 2014 4:00 PM

Answers

  • You'll need to get a reference to the control and then call it's Focus method. You can get a reference with the VisualTreeHelper class.

    There isn't a way to directly synthesize keyboard input.

    Wednesday, November 5, 2014 6:13 PM
    Owner

All replies