IsTabStop doesn't work as expected?

3 posts, 1 answers
  1. Vadimir
    Vadimir avatar
    24 posts
    Member since:
    Aug 2013

    Posted 17 Sep 2013 Link to this post

    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. Answer
    Pavel R. Pavlov
    Admin
    Pavel R. Pavlov avatar
    1182 posts

    Posted 18 Sep 2013 Link to this post

    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 >>
  3. UI for WPF is Visual Studio 2017 Ready
  4. Vadimir
    Vadimir avatar
    24 posts
    Member since:
    Aug 2013

    Posted 18 Sep 2013 Link to this post

    Hi Pavel,
    Thanks. I've implemented the feature using your example.
    Regards,
    Gong
Back to Top