WrapGrid水平滚动Windows 8

Che*_*ese 4 xaml listview horizontal-scrolling windows-runtime

主网格有下一个XAML:

<ListView Grid.Row="1" x:Name="NewsListBox">
            <ListView.Background>
                <SolidColorBrush Color="#FF006C67" Opacity="0.5"/>
            </ListView.Background>
            <ListView.ItemsPanel>
                <ItemsPanelTemplate>
                    <WrapGrid Orientation="Vertical"/>
                </ItemsPanelTemplate>
            </ListView.ItemsPanel>
        </ListView>
Run Code Online (Sandbox Code Playgroud)

它看起来不错,它是如何需要的:

但它不会滚动内容!

例

好的,我添加了ScrollViewer:

<ScrollViewer Grid.Row="1" VerticalScrollMode="Disabled" ZoomMode="Disabled">
        <ListView Grid.Row="1" x:Name="NewsListBox">
            <ListView.Background>
                <SolidColorBrush Color="#FF006C67" Opacity="0.5"/>
            </ListView.Background>
            <ListView.ItemsPanel>
                <ItemsPanelTemplate>
                    <WrapGrid Orientation="Vertical"/>
                </ItemsPanelTemplate>
            </ListView.ItemsPanel>
        </ListView>
        </ScrollViewer>
Run Code Online (Sandbox Code Playgroud)

并且它垂直堆叠所有内容:

例

我究竟做错了什么?

Che*_*ese 5

找到了解决方案.不需要ScrollViewer.

只需用GridView替换ListView,因为ListView不是为水平滚动而设计的.