RadWizardPage footer container shouldn't be focusable

1 Answer 15 Views
Wizard
Shawn
Top achievements
Rank 1
Iron
Iron
Shawn asked on 01 May 2025, 12:29 AM

I'm having an issue when using the RadWizard where as the user tabs through the fields on the wizard page, when they get to the end and hit tab again, they expect the left most button in the footer to then take focus but instead it focuses on the footer container first. So they have to hit tab one more time to focus the button. Can this be fixed in the next version? What can I do in the meantime as a temporary fix?

I was able to duplicate the issue in the Telerik UI for WPF demo app. See screenshot for sample.

1 Answer, 1 is accepted

Sort by
0
Accepted
Stenly
Telerik team
answered on 02 May 2025, 09:44 AM

Hello Shawn, 

To prevent the footer element from being focused, you could retrieve the ContentControl element with x:Name="PART_FooterContentControl" on the Loaded event of RadWizard, via the ChildrenOfType extension method, and set its Focusable property to false.

The following code snippets showcase this suggestion's implementation, where the logic is applied via an attached property:

public class WizardExtensions
{
    public static bool GetShouldSetFooterUnfocusable(DependencyObject obj)
    {
        return (bool)obj.GetValue(ShouldSetFooterUnfocusableProperty);
    }

    public static void SetShouldSetFooterUnfocusable(DependencyObject obj, bool value)
    {
        obj.SetValue(ShouldSetFooterUnfocusableProperty, value);
    }

    // Using a DependencyProperty as the backing store for ShouldSetFooterUnfocusable.  This enables animation, styling, binding, etc...
    public static readonly DependencyProperty ShouldSetFooterUnfocusableProperty =
        DependencyProperty.RegisterAttached("ShouldSetFooterUnfocusable", typeof(bool), typeof(WizardExtensions), new PropertyMetadata(false, OnShouldSetFooterUnfocusableChanged));

    private static void OnShouldSetFooterUnfocusableChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
    {
        if ((bool)e.NewValue)
        {
            RadWizard radWizard = (RadWizard)d;
            radWizard.Loaded += RadWizard_Loaded;
        }
    }

    private static void RadWizard_Loaded(object sender, RoutedEventArgs e)
    {
        RadWizard radWizard = (RadWizard)sender;

        ContentControl footer = radWizard.ChildrenOfType<ContentControl>().FirstOrDefault(x => x.Name == "PART_FooterContentControl");

        if (footer != null)
        {
            footer.Focusable = false;
        }
    }
}
<telerik:RadWizard x:Name="radWizard" local:WizardExtensions.ShouldSetFooterUnfocusable="True"/>

With this being said, could you give this suggestion a try?

Regards,
Stenly
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Shawn
Top achievements
Rank 1
Iron
Iron
commented on 02 May 2025, 04:26 PM

That worked. Thanks!
Tags
Wizard
Asked by
Shawn
Top achievements
Rank 1
Iron
Iron
Answers by
Stenly
Telerik team
Share this question
or