views:

6

answers:

0

We have a situation in our Silverlight 3 app where we have buttons that execute save/commit actions on the form. While the commit is happening, the Command that the button is bound to has its CanExecute set to false so that the user can't initiate another action until this one completes. Setting CanExecute to false causes the button to be disabled .

The buttons have tabstops, so when the user clicks the button, they set focus to it. When the button is disabled, it can no longer hold focus, and so the focus is automatically moved on to the next control.

This behaviour isn't very desirable for us. From the users' perspective, clicking the buttons on the forms appears to move focus to random parts of the screen.

When the form becomes active again, we want the focus to be in a sensible place. Obviously what is a sensible place is app specific. But I'm wondering how other people have approached this problem because the underlying problem itself is pretty basic.