Geoffrey Lalloué
Geoffrey Lalloué

Reputation: 1464

template10 : resizer doesn't focus on tab key pressed

I use a resizer control from template10 library in ma uwp xaml page. When i tap on tab key on my keyboard, focus is going to next input on my form, but when I arrive to resizer control, focus is lost.

<TextBox    TextWrapping="Wrap"
            AcceptsReturn="True"
            Width="500" Height="30"
            Text="{Binding ContactForm.Subject, Mode=TwoWay}" 
            HorizontalAlignment="Left"/>

<controls:Resizer Margin="0,0,0,24">
    <TextBox    TextWrapping="Wrap"
                AcceptsReturn="True"
                MinWidth="500" MinHeight="100"
                Text="{Binding ContactForm.Message, Mode=TwoWay}"
                HorizontalAlignment="Left">
    </TextBox>
</controls:Resizer>

Does anyone know how to keep focus on textbox inclued on resizer control by pressing tab key ?

Upvotes: 0

Views: 52

Answers (1)

Jayden
Jayden

Reputation: 3286

When you tap the "Tab", the TextBox in Resizercan get focus. But you need to tap three times "Tab" to make the TextBox in Resizer to get focus.

If you want to keep focus on TextBox inclued on Resizer control by pressing tab key, you should be able to set False to IsTabStop property of the Resizer control and set False to IsTabStop property of the ContentControl in Resizer's template. If IsTabStop is false, the control is excluded from tab navigation and the control cannot receive input focus.

To modify the template of Resizer, we can select the Resizer in "Document Outline" and right click, then select "Edit Template"→ "Edit a Copy...".

Upvotes: 1

Related Questions