Wednesday, April 2, 2014

Cursor Position on Enter key

Recently, one of my followers requested for a code snippet to implement the ENTER key press. The requirement was to move the cursor on the next WPF UI element, whenever the ENTER key is pressed.

Implementation of the above requirement is straight forward, if one has the knowledge of InputBindings and Command. Using these two, MoveFocus method of currently focused element, can be called, as shown in the mentioned below code snippet:
















Hope it will help you.

No comments:

Post a Comment