在开始时使用不同大小的项目制作网格视图 [英] Making a gridview with different sized items at the start efficient

查看:96
本文介绍了在开始时使用不同大小的项目制作网格视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的网格视图如下所示:

I've got a gridview that looks like this:

xaml是:

<GridView ItemTemplateSelector="{StaticResource RecentLibraryBookTemplateSelector}" >
    <GridView.GroupStyle>
        <GroupStyle HeaderTemplate="{StaticResource GroupTitle}">
            <GroupStyle.Panel>
                <ItemsPanelTemplate>
                    <VariableSizedWrapGrid Orientation="Vertical" Margin="0,0,40,0"/>
                </ItemsPanelTemplate>
            </GroupStyle.Panel>
        </GroupStyle>
    </GridView.GroupStyle>
    <GridView.ItemsPanel>
    <ItemsPanelTemplate>
        <VirtualizingStackPanel Orientation="Horizontal"/>
    </ItemsPanelTemplate>
    </GridView.ItemsPanel>
</GridView>

然而,随着Windows 8.1中的所有新效率,此gridview现在非常低效,因为它没有使用新面板。 但是如果我改变它使用新的面板它看起来有些荒谬(忽略来自XAMLSpy的红色边框):

However with all the new efficiencies in windows 8.1 this gridview is now quite inefficient, because it is not using the new panels.  However if I change it use the new panels it looks somewhat ridiculous (Ignore the red border that is from XAMLSpy):

是否有任何选项可以创建一个griview,其中只有第一组使用不同的模板,这是一个不同的尺寸?可能有4个或5个的其他组都使用相同的模板并且宽度相同。

Are there any options to be able to create a griview where just the first group is using a different template, which is a different size? The other groups of which there may be 4 or 5 are all using the same template and all the same width.

Stefan

推荐答案

也许用于演示您的问题的示例代码将能够更好地理解您的问题。你可以通过Skydrive分享你的整个repro吗?

Maybe a sample code that demonstrates your problem will be able to understand your issue better. Can you share your entire repro via Skydrive?

谢谢,

Prashant


这篇关于在开始时使用不同大小的项目制作网格视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆