I have a listview control as below which has header template and item template. On clicking the button which opens this list view, focus first comes to the entire list view. On hitting tab, focus comes to the first list view item skipping the header. Anyways I can navigate to headers using up arrow/down arrow keys but the expected behaviour is on hitting tab, focus first comes to the header template
<ListView
x:Name="DataListView"
Grid.Row="1"
IsItemClickEnabled="True"
ItemClick="ListView_ItemClick"
RightTapped="ListView_RightTapped"
SelectionMode="None"
IsTabStop="{x:Bind utilities:XamlExtensions.Invert(ViewModel.IsInitialSetupCompleted), Mode=OneWay}"
ItemTemplateSelector="{StaticResource ItemTemplateSelector}">
<ListView.ItemContainerStyle>
<Style TargetType="ListViewItem" BasedOn="{StaticResource NoMarginListStyle}">
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
<Setter Property="VerticalContentAlignment" Value="Stretch"/>
</Style>
</ListView.ItemContainerStyle>
<ListView.GroupStyle>
<GroupStyle>
<GroupStyle.HeaderContainerStyle>
<Style TargetType="ListViewHeaderItem">
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
</Style>
</GroupStyle.HeaderContainerStyle>
<GroupStyle.HeaderTemplate>
<DataTemplate x:DataType="today:HeaderGroupViewModel">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<TextBlock
Text="{x:Bind Name}"
Grid.Column="0"
TextWrapping="WrapWholeWords"/>
<Button
Grid.Column="1"
Click="MoreOptions_Click"
RightTapped="Button_RightTapped"
Style="{ThemeResource BrandedChromelessButton}">
</Button>
</Grid>
</DataTemplate>
</GroupStyle.HeaderTemplate>
</GroupStyle>
</ListView.GroupStyle>
<ListView.ItemsPanel>
<ItemsPanelTemplate>
<ItemsStackPanel AreStickyGroupHeadersEnabled="False"/>
</ItemsPanelTemplate>
</ListView.ItemsPanel>
</ListView>
Any help is appreiciated. I tried using tab index but didn't work. Thanks