how to programmatically move to next control? RRS feed

  • 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,


    Wednesday, November 5, 2014 4:00 PM


  • 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

All replies