none
[Xbox]GridView items are not correctly navigatable on Xbox RRS feed

  • Question

  • Hello,

    I am using a GridView to display a set of items. I am not being able to access all the items inside my GridView using Xbox controller. The items that appear in the first view are easily navigatable. But I am not getting focus on the items that are next visible frame( or say next page), on scrolling. I can scroll and see the next items but not getting focus on them. I can access only those items that are in first loaded frame.

    Here is my XAML code - 

            <GridView x:Name="MyGridView" Grid.Row="2" Margin="10, 0, 0, 0" SelectionChanged="MyGridView_SelectionChanged" IsItemClickEnabled="True" ItemClick="MyGridView_ItemClick" 
                          ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                          ScrollViewer.HorizontalScrollMode="Auto"
                          ScrollViewer.VerticalScrollBarVisibility="Disabled"
                           ScrollViewer.VerticalScrollMode="Disabled">
                <GridView.ItemsPanel>
                    <ItemsPanelTemplate>
                        <WrapGrid Orientation="Vertical" MaximumRowsOrColumns="1" ItemHeight="118" ItemWidth="168">
                        </WrapGrid>
                    </ItemsPanelTemplate>
                </GridView.ItemsPanel>
                <GridView.ItemTemplate>
                    <DataTemplate>
                        <Grid x:Name="MyDataItemGrid" Margin="5">
                            <Grid.RowDefinitions>
                                <RowDefinition/>
                            </Grid.RowDefinitions>
                            <Image Grid.Row="0" x:Name="item_image" Stretch="Fill" VerticalAlignment="Top" HorizontalAlignment="Center" Source="{Binding image}" Margin="0,0,0, 30" CacheMode="BitmapCache" />
                            <StackPanel VerticalAlignment="Bottom" Background="#333333">
                                <TextBlock Grid.Row="1" Text="{Binding imageTitle}" Height="30" FontSize="11" TextWrapping="Wrap" HorizontalAlignment="Stretch" FontStretch="ExtraCondensed" TextAlignment="Center" VerticalAlignment="Bottom" Foreground="#7e7e7e"/>
                            </StackPanel>
                        </Grid>
                    </DataTemplate>
                </GridView.ItemTemplate>
    
            </GridView>

    Any help is really appreciated!


    Friday, August 30, 2019 5:50 AM

Answers

All replies

  • Got the solution.

    Using ItemsWrapGrid insteat of WrapGrid has solved my problem.

    • Marked as answer by Garima Bhasin Friday, August 30, 2019 6:13 AM
    Friday, August 30, 2019 6:13 AM
  • Hi,

    Glad to hear that you had solved the problem and share it here.

    Best regards,

    Roy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, September 3, 2019 3:29 AM
    Moderator