This project has moved. For the latest updates, please go here.

ButtonSpinner and focus

Jul 6, 2011 at 12:07 AM

In order to create a time picker that does exactly what I want (http://wpftoolkit.codeplex.com/discussions/263356) I have created one with three text boxes and wanted to use the buttonspinner.

Weirdly, when I click on one of the buttons on the button spinner, my text boxes lose focus.  I have resolved the issue by editing the generic.xaml for ButtonSpinner. I have had to add:

Focusable="False"

on the two RepeatButtons.

But it makes me wonder if I am missing something, is there a better way to resolve this?

...Stefan

Jul 7, 2011 at 12:06 AM

I think the approach you have taken seems logical and simple.  I can't think of any real side effects except maybe tabbing to the buttons and using the keyboard to interact with the buttons, but I don't know this for sure.  If you don't see any side effects I may do the same.