GridView with 2 Rows and horizontal scroll RRS feed

  • Question

  • im trying to achieve something looking like this using a GridView in a Windows Store App project enter image description here

    i can get my items in a single line with horizontal scroll, but i want to have a GridView with 2 rows

    <GridView Grid.Row="1" Margin="22,0,0,0" Style="{StaticResource GridViewStyle}" SelectionMode="None" ItemsSource="{Binding UserPhotos}"  HorizontalContentAlignment="Center" VerticalContentAlignment="Center">
                                    <Ellipse HorizontalAlignment="Left" Height="30" Width="30" Margin="0,7,10,0">
                                            <ImageBrush Stretch="Uniform" ImageSource="{Binding}"/>

    what should i change/add to get this result?

    Monday, May 11, 2015 4:53 PM


  • Hi Thought2,

    We can change the GridView items layout by modifying the GridView ItemsPanel, so please try to use the ItemsWrapGrid in the GridView ItemsPanelTemplate, then if you want to let the GridView have two rows, you can set the ItemsWrapGrid.MaximumRowsOrColumns property as two and Orientation property as "Vertical", for more information please refer to the following xaml:

                        <ItemsWrapGrid Orientation="Vertical" MaximumRowsOrColumns="2"></ItemsWrapGrid>
    Best Regards,
    Amy Peng

    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, May 12, 2015 11:09 AM