I have a WPF view with two text fields. I would like to automatically move the focus forward from the first text box to the second when the user presses the down arrow on the keyboard in the same way as Tab.
It seems like I should do it 100% declaratively, but for some reason, the teams that I thought would do it seem to do nothing. Here is my first attempt that does not work:
<StackPanel>
<TextBox Text="Test">
<TextBox.InputBindings>
<KeyBinding Key="Down" Command="ComponentCommands.MoveFocusDown" />
</TextBox.InputBindings>
</TextBox>
<TextBox></TextBox>
</StackPanel>
Does anyone have any experience? It seems like I should be able to use InputBindings or EventTrigger for this.
I am using MVVM and this is a View problem. I could just look into a small code form (this is a consideration, this is reasonable), but it seems to me that I missed something.