改性ItemsPanel ListView的内容不会显示设计师(VS和Blend) [英] The content of a ListView with ItemsPanel modified is not shown in designer (VS and Blend)

查看:113
本文介绍了改性ItemsPanel ListView的内容不会显示设计师(VS和Blend)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这样的code:

          <ListView Margin="0,10,0,0">
                <!--Orientation="Horizontal"-->
                <ListView.ItemsPanel>
                    <ItemsPanelTemplate>
                        <WrapGrid Orientation="Horizontal" />
                    </ItemsPanelTemplate>
                </ListView.ItemsPanel>

                <ListView.Items>
                    <AppBarButton Icon="Download"
                                  IsCompact="False"
                                  Label="Stáhnout test"
                                  HorizontalAlignment="Center"></AppBarButton>
                    <AppBarButton Icon="Play"
                                  IsCompact="False"
                                  Label="Spustit test"
                                  HorizontalAlignment="Center"></AppBarButton>
                    <AppBarButton Icon="Attach"
                                  Grid.Column="4"
                                  IsCompact="False"
                                  Label="Otevřít přílohu testu"
                                  HorizontalAlignment="Center"></AppBarButton>
                    <AppBarButton Icon="ShowResults"
                                  IsCompact="False"
                                  Label="Výsledky"
                                  HorizontalAlignment="Center"></AppBarButton>
                    <AppBarButton Icon="Delete"
                                  IsCompact="False"
                                  Label="Smazat cache"
                                  HorizontalAlignment="Center"></AppBarButton>
                </ListView.Items>
        </ListView>

...它运行时工作正常。当没有足够的水平空间,一些应用程序栏按钮被渲染到下一行(列表视图的内容包),这是我想要的。我在这里找到这个解决方案: Windows 8的WrapPanel

的问题是,设计者(VS和也混合)不显示lsitview的内容都没有。如果我注释掉ListView.ItemsPanel部分,设计师是在后面的比赛。

The problem is that the designer (VS and also Blend) do not show the content of the lsitview at all. If I comment out the ListView.ItemsPanel section, the designer is back in the game.

有没有办法如何解决这个问题?

Is there a way how to overcome this issue?

推荐答案

这是与设计师一个已知的问题,目前正在研究在未来的版本中修复。

This is a known problem with the designer and is being investigated for a fix in future versions.

如果你的目标是Windows 8.1,然后使用ItemsWrapGrid代替WrapGrid建议。该ItemsWrapGrid都将在设计和运行时正确显示。

If you are targeting Windows 8.1 then using an ItemsWrapGrid instead of a WrapGrid is recommended. The ItemsWrapGrid will show up correctly both in the designer and at runtime.

- 罗布

这篇关于改性ItemsPanel ListView的内容不会显示设计师(VS和Blend)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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