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

IsTabStop doesn't work as expected?

2 Answers 452 Views
Expander
This is a migrated thread and some comments may be shown as answers.
Vadimir
Top achievements
Rank 1
Vadimir asked on 17 Sep 2013, 08:06 AM
Hi,
I'm using Telerik controls with version 2013.2.724.40, and VS 2010.
In the following code example, I'd like to use tab to navigate only between the 3 TextBoxes. IsTabStop is set to false, but the tab still stops at the RadExpander, is it an expected behavior?

Thanks.
Gong

<telerik:RadWindow x:Class="ExpanderWpfApp.MainWindow"
                   xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                   xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                   xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
                   Height="300" Width="300" >
    <StackPanel>
        <TextBox/>
        <telerik:RadExpander IsExpanded="True" IsTabStop="False">
            <TextBox/>
        </telerik:RadExpander>
        <TextBox/>
    </StackPanel>
</telerik:RadWindow>

2 Answers, 1 is accepted

Sort by
0
Accepted
Pavel R. Pavlov
Telerik team
answered on 18 Sep 2013, 06:03 AM
Hi Gong,

Thank you for contacting us on that matter. Please note that the IsTabStop property of the RadExpander control is set to False by default.

However, when you tab into the control, the focus goes in the button inside the header. We designed it like this, because you are allowed to expand/collapse the RadExpander using the keyboard. When the focus is in the button, you can press the space bar key and the control will change its status.

In order to achieve your requirement, you can extract the default template of the control and manually set the IsTabStop property of the RadToggleButton control to False. Please, have in mind that by following this approach you will not be able to expand/collapse the control  using your keyboard.

For your convenience I extracted and edited the default template of the control in the attached project. Please take a look at it and let us know if you need any further assistance.

Regards,
Pavel R. Pavlov
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Vadimir
Top achievements
Rank 1
answered on 18 Sep 2013, 09:34 AM
Hi Pavel,
Thanks. I've implemented the feature using your example.
Regards,
Gong
Tags
Expander
Asked by
Vadimir
Top achievements
Rank 1
Answers by
Pavel R. Pavlov
Telerik team
Vadimir
Top achievements
Rank 1
Share this question
or