This is a migrated thread and some comments may be shown as answers.

Style Setter KeyboardNavigation.TabNavigation

1 Answer 221 Views
MaskedInput (Numeric, DateTime, Text, Currency)
This is a migrated thread and some comments may be shown as answers.
Dean
Top achievements
Rank 1
Dean asked on 24 May 2012, 10:01 PM
I'm trying to set the KeyboardNavigation.TabNavigation property to Local using a style template.  For some reason, it's not working, even in this most basic format:
<StackPanel>
    <telerik:RadMaskedNumericInput Name="radMaskedNumericInput1">
        <telerik:RadMaskedNumericInput.Style>
            <Style TargetType="telerik:RadMaskedNumericInput">
                <Setter Property="KeyboardNavigation.TabNavigation" Value="Local"/>
                <Setter Property="Mask" Value="#3.4"></Setter>
            </Style>
        </telerik:RadMaskedNumericInput.Style>
    </telerik:RadMaskedNumericInput>
    <telerik:RadMaskedNumericInput Name="radMaskedNumericInput2" KeyboardNavigation.TabNavigation="Local" Mask="#6.3"/>
</StackPanel>

The setter of the Mask property works, but the tab navigation in radMaskedInput1 still acts like it's set to Continue.  The tab navigation in radMaskedNumericInput2 properly only puts the cursor in the input box once and then exits on the next tab.

I'm using RadControls for WPF v.2011.2.920.40

1 Answer, 1 is accepted

Sort by
0
Tina Stancheva
Telerik team
answered on 29 May 2012, 11:41 AM
Hello Dean,

As we have no control over the KeyboardNavigation.TabNavigation property, we decided to add a new property to control the tab navigation inside the RadMaskedInput controls - the SectionsNavigationMode property. It is an enumeration of type SectionsNavigationMode and it exposes the following values:
  • None - if you set the SectionsNavigationMode to Local, you won't be able to tab through the RadMaskedInput control's sections
  • Once - if you set the SectionsNavigationMode to Once, you will be able to Tab through all sections of the RadMaskedInput control untill reaching the end and tabbing to the next control
  • Cycle - if you set the SectionsNavigationMode to Cycle, the Tab key will only cycle through the RadMaskedInput control's sections
This property was first introduced in the Q3 2011 release so if you can update you'll be able to use it and apply its values in style setters.

Kind regards,
Tina Stancheva
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
MaskedInput (Numeric, DateTime, Text, Currency)
Asked by
Dean
Top achievements
Rank 1
Answers by
Tina Stancheva
Telerik team
Share this question
or