none
GirdView布局,怎么显示自定义数据模块 RRS feed

  • 问题

  • 最近在开发windows8应用,看了应用商店里国内很多都做了Metro风格的应用,首页的布局首先遇到了问题,具体请看下图

     首页,我已经异步将首页推荐、男生、女生的数据都绑定好啦,就是不清楚后面的菜单、最近阅读、搜索等内容绑定出来。具体应该怎样做,是直接在GridView后面添加自定义控件,还是在后台动态绑定控件,或许这些我根本就说的不对,反正不管怎样,就要上面的效果,给一个正确的思路和做法,版主Bob Bao和大家帮助一下!多谢

    下面是GridView绑定的代码:

    <GridView
                x:Name="itemGridView"
                AutomationProperties.AutomationId="ItemGridView"
                AutomationProperties.Name="Grouped Items"
                Grid.Row="1"
                Margin="0,-3,0,0"
                Padding="116,0,40,46"
                ItemsSource="{Binding Source={StaticResource groupedItemsViewSource}}"
                ItemTemplate="{StaticResource Standard160x205ItemTemplate}"
                SelectionMode="None"
                IsItemClickEnabled="True"
                ItemClick="ItemView_ItemClick">
               
                <GridView.ItemTemplateSelector>
                    <DataTemplateSelector></DataTemplateSelector>
                </GridView.ItemTemplateSelector>
                <GridView.ItemsPanel>
                    <ItemsPanelTemplate>                       
                        <VirtualizingStackPanel Orientation="Horizontal"/>
                    </ItemsPanelTemplate>
                </GridView.ItemsPanel>
                <GridView.GroupStyle>
                    <GroupStyle>
                        <GroupStyle.HeaderTemplate>
                            <DataTemplate>
                                <Grid Margin="1,0,0,6">
                                    <Button
                                        AutomationProperties.Name="Group Title"
                                        Content="{Binding Title}"
                                        Click="Header_Click"
                                        Style="{StaticResource TextButtonStyle}"/>
                                </Grid>
                            </DataTemplate>
                        </GroupStyle.HeaderTemplate>
                        <GroupStyle.Panel>
                            <ItemsPanelTemplate>
                                <VariableSizedWrapGrid Orientation="Vertical" Margin="0,0,80,0"/>
                            </ItemsPanelTemplate>
                        </GroupStyle.Panel>
                    </GroupStyle>
                </GridView.GroupStyle>
            </GridView>

    2012年8月13日 7:50

答案