I see strange behavior with my CheckBox and its focus / tab orientation.
First, create a βworkingβ code:
<Grid> <Grid.RowDefinitions> <RowDefinition /> <RowDefinition /> </Grid.RowDefinitions> <Button Grid.Row="0" Width="100" Height="25"/> <TabControl Grid.Row="1" > <TabItem Header="tabItem1" Name="tabItem1" FocusManager.IsFocusScope="True"> <ScrollViewer> <Grid> <Grid.RowDefinitions> <RowDefinition /> <RowDefinition /> <RowDefinition /> <RowDefinition /> </Grid.RowDefinitions> <TextBox Grid.Row="0" /> <TextBox Grid.Row="1"/> <CheckBox Grid.Row="2" Content="Test" /> <TextBox Grid.Row="3"/> </Grid> </ScrollViewer> </TabItem> </TabControl> </Grid>
If you try this, the order of the tabs will work fine - until you check CheckBox. If I check CheckBox, it loses focus, and the next tab presses the focus on the button.
If I FocusManager.IsFocusScope="True" , everything works fine.
My question is, is this a wish or a mistake?
source share