添加WrapGrid后,ListView项目在设计器中消失

时间:2014-05-20 16:49:38

标签: xaml windows-store-apps

WrapGrid使TextBlocks有效消失。显示项目的轮廓,但无法看到文本。在运行期间,项目正确显示。

如何在设计时出现它们?

 <ListView HorizontalAlignment="Left">
        <ListView.ItemsPanel>
            <ItemsPanelTemplate>
                <WrapGrid Orientation="Horizontal" MaximumRowsOrColumns="3"></WrapGrid>
            </ItemsPanelTemplate>
        </ListView.ItemsPanel>
        <ListView.Items>
            <TextBlock>LOREM IPSUM</TextBlock>
            <TextBlock>LOREM IPSUM</TextBlock>
            <TextBlock>LOREM IPSUM</TextBlock>
            <TextBlock>LOREM IPSUM</TextBlock>
            <TextBlock>LOREM IPSUM</TextBlock>
            <TextBlock>LOREM IPSUM</TextBlock>
            <TextBlock>LOREM IPSUM</TextBlock>
            <TextBlock>LOREM IPSUM</TextBlock>
            <TextBlock>LOREM IPSUM</TextBlock>
            <TextBlock>LOREM IPSUM</TextBlock>
            <TextBlock>LOREM IPSUM</TextBlock>
            <TextBlock>LOREM IPSUM</TextBlock>
        </ListView.Items>
    </ListView>

1 个答案:

答案 0 :(得分:1)

我在这里找到答案:The content of a ListView with ItemsPanel modified is not shown in designer (VS and Blend)

基本上它是一个已知的bug,他们建议使用ItemsWrapGrid而不是WrapGrid。