Hi,
I have a treeview, with a hierarchical datatemplate, and then sub items are rendered with a data template which has a couple of text boxes for editing info on the treeview items.
When I'm in the first textbox and press the tab key I want focus to move to the second textbox, but instead it jumps out of the treeview. How can I get this to work?
Here's what my datatemplate looks like:
<DataTemplate x:Key="GoverningBodyTemplate">
<StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock VerticalAlignment="Center">Enrolment No:</TextBlock>
<TextBox VerticalAlignment="Center" Text="{Binding Path=EnrolmentNumber}" Width="100"/>
</StackPanel>
<StackPanel Orientation="Horizontal" Visibility="{Binding Path=GoverningBody.RequiresBranch, Converter={StaticResource BoolToVisibilityConverter}}">
<TextBlock VerticalAlignment="Center">Branch No:</TextBlock>
<TextBox VerticalAlignment="Center" Text="{Binding Path=BranchNumber}" Width="100" TabIndex="1"/>
</StackPanel>
</StackPanel>
</DataTemplate>
Any help would be greatly appreciated!
John
I have a treeview, with a hierarchical datatemplate, and then sub items are rendered with a data template which has a couple of text boxes for editing info on the treeview items.
When I'm in the first textbox and press the tab key I want focus to move to the second textbox, but instead it jumps out of the treeview. How can I get this to work?
Here's what my datatemplate looks like:
<DataTemplate x:Key="GoverningBodyTemplate">
<StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock VerticalAlignment="Center">Enrolment No:</TextBlock>
<TextBox VerticalAlignment="Center" Text="{Binding Path=EnrolmentNumber}" Width="100"/>
</StackPanel>
<StackPanel Orientation="Horizontal" Visibility="{Binding Path=GoverningBody.RequiresBranch, Converter={StaticResource BoolToVisibilityConverter}}">
<TextBlock VerticalAlignment="Center">Branch No:</TextBlock>
<TextBox VerticalAlignment="Center" Text="{Binding Path=BranchNumber}" Width="100" TabIndex="1"/>
</StackPanel>
</StackPanel>
</DataTemplate>
Any help would be greatly appreciated!
John