Focus In An ItemsControl

Posted by Andrew on Stack Overflow See other posts from Stack Overflow or by Andrew
Published on 2010-05-05T01:53:14Z Indexed on 2010/05/05 1:58 UTC
Read the original article Hit count: 477

Filed under:
|

I have an ItemsControl that uses a DataTemplate. The DataTemplate contains a TextBox, which can receive keyboard focus. I need to be able to move the keyboard focus from the currently focused TextBox in the DataTemplate to the next TextBox, as if the Tab key has been pressed. I've noticed that there is a UIElement.MoveFocus() method, but this begs the question as to which UIElement should be used to call the method. This is probably the reason why I haven't gotten this method to work for me... Any help would be really appreciated!

Thanks,

Andrew

© Stack Overflow or respective owner

Related posts about wpf

Related posts about focus