0

I am trying to convert my silverlight application to wpf application. In the custom controls i have this piece of code:

<Style TargetType="ComboBox" x:Name="CcsDataGridDynamicCellComboBox" x:Key="CcsDataGridDynamicCellComboBox">
    <Setter Property="Padding" Value="6,2,25,2" />
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="BorderThickness" Value="1"/>
 /////////////this is where i am  facing error: 
    <Setter Property="TabNavigation" Value="Once" />
    <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
    <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
    <Setter Property="BorderBrush">
        <Setter.Value>

The error i am having is:

Error 1 The member "TabNavigation" is not recognized or is not accessible. C:\Users\sahluwai\Desktop\cusControls2\leitch\HarrisSilverlightToolkit\Toolkit\Source\Controls\Table\Themes\CcsDataGridDynamicCellComboBox.xaml 61 17 Table

So This means that "TabNavigationProperty" is not available in wpf.so what should i use instead or is the default behavior of wpf the same as i am trying to specify(ie. TabNavigationproperty is default to "once")?

Raman
  • 216
  • 3
  • 15

2 Answers2

1

Not positive, but I think the property you are looking for is KeyboardNavigation.TabNavigation.

ChrisPBacon
  • 177
  • 2
  • 15
0

Not sure on this, but I think what you would do is instead of setting your TabNavigation Property, you could set the TabIndex Property to whichever value you want the combo box to be in the tab order. For example, if you sit the TabIndex value to 4, then if you hit tab 4 times, you will end up on your comboBox. Here is another article you can check out. WPF Tab Key Navigation.

Community
  • 1
  • 1
ProgrammingDude
  • 597
  • 1
  • 5
  • 25