locked
Issue with Gridview when updated to windows 8.1 RRS feed

  • Question

  • I Just updated my code to windows 8.1, I had a page with gridvie that bind a List of items. it was scroll fine in windows 8, but now when you scroll to left, it scroll to black, it takes time to download items, see the image and here is the xaml code: 

    <local:CatalogItemsPageStub
        x:Name="This"
        x:Class="Client.Shell.CatalogItemsPage"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="using:Client.Shell"
        xmlns:sampleData="using:Client.Shell.SampleData"
        xmlns:utility="using:Client.Shell.Utility"
        mc:Ignorable="d"
        >


        <Grid Background="Transparent">

                <GridView 
                              x:Name="itemGridView"
                              AutomationProperties.AutomationId="ItemsGridView"
                              AutomationProperties.Name="Items"
                              ItemsSource="{Binding Items}" 
                              SelectionMode="None"
                              Loaded="itemGridView_Loaded" Margin="0,0,0,0"
                              >
                    <GridView.ItemTemplate>
                        <DataTemplate>
                            <local:CatalogItemsItem ItemPressed="HandleItemPressed"/>
                        </DataTemplate>
                    </GridView.ItemTemplate>
                </GridView>
        </Grid>
    </local:CatalogItemsPageStub>


    Tariq

    Wednesday, November 20, 2013 6:52 PM

Answers

  • 1) I am using Win 8.1 GA

    2) It happens For both cases, Built in classes and my custom control

    I added the following lines of code and it solved the problem:

                <GridView.ItemsPanel>
                    <ItemsPanelTemplate>
                        <WrapGrid VerticalChildrenAlignment="Top" HorizontalChildrenAlignment="Center"/>
                    </ItemsPanelTemplate>
                </GridView.ItemsPanel>

    but i really want to know what the difference from Win 8 to Win 8.1 that cause this issue, I watched Tim Heuer Session at build2013 and he mentioned that the new xaml improved this issue.

    Thanks. 

     

    Tariq

    Thursday, November 21, 2013 8:14 PM

All replies

  • A couple of questions here: 
    1) Are you using Win 8.1 RTM?

    2) Does this occur if you use a built-in class for the datatemplate, or only with your custom class?


    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Thursday, November 21, 2013 4:06 PM
    Moderator
  • 1) I am using Win 8.1 GA

    2) It happens For both cases, Built in classes and my custom control

    I added the following lines of code and it solved the problem:

                <GridView.ItemsPanel>
                    <ItemsPanelTemplate>
                        <WrapGrid VerticalChildrenAlignment="Top" HorizontalChildrenAlignment="Center"/>
                    </ItemsPanelTemplate>
                </GridView.ItemsPanel>

    but i really want to know what the difference from Win 8 to Win 8.1 that cause this issue, I watched Tim Heuer Session at build2013 and he mentioned that the new xaml improved this issue.

    Thanks. 

     

    Tariq

    Thursday, November 21, 2013 8:14 PM