WP7 Text Boxes – OnEnter (my 1st Behaviour).

One problem I have encountered on various WP7 apps (including my own applications) is moving between text boxes on a page. The problem can present itself when the SIP is being displayed in front of the next control that requires input.

In some cases the user is forced to press an area on the page that does not include a text control to take the focus away from the text box. Once the SIP is hidden then the user can click the control they want to enter text into.

This is mainly because the controls do not support the concept of tab order because the SIP does not include a tab control to move between controls.

One solution to this is to look for the enter key to be released and move the focus on to the next control:

This could prove to be a pain for developers and forces additional code within the page code file that can be said to be quite untidy.

It is because of this that I have created my own solution using a behaviour that can be attached to a control. One advantage of this is that it will be possible to set the values using Blend therefore reducing the reliance on the developer.

The OnEnter Behaviour:

The XAML below gives an example on how the behaviour can be attached to a text box

Please have a look at my keyboard behaviour over at http://pauliom.wordpress.com as it also talks about tab stops. Also how to use it with binding too. Sorry using wp7 so can’t copy and paste actual link
.