tags:

views:

793

answers:

2

I am migrating some win forms panels to WPF.

In WinForms, you can tab into to the combo box using the keyboard, select an item by typing the first character and then hit tab again and the combo to lose focus.

In WPF the second tab will move the focus rectangle down the list, instead of moving onto the next control.

Is there a way to get the old behavior? Or has anyone implemented an ItemTemplate that achieves this behvaiour?

thanks

+3  A: 

Duh.

There is a ComboBoxItem which has an IsTabStop property.

So I just applied the appropriate style:

<Style TargetType="{x:Type ComboBoxItem}">
    <Setter Property="IsTabStop" Value="False"/>
</Style>
Gus Paul
A: 

Hmmm... I wonder if that is right though - when I implement this, the Tab no longer tabs between items in the list, but the arrow keys no longer select items either. I wonder why. Any clues?

Craig Shearer