我有以下XAML文件。我想让我的图像水平滚动。 它不起作用,可能出现什么问题?
<DataTemplate x:Key="SampleDataTemplate">
<Grid Margin="0,0,0,10">
<Grid.RowDefinitions>
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<GridView ScrollViewer.HorizontalScrollBarVisibility="Visible" ScrollViewer.HorizontalScrollMode="Enabled">
<GridView.ItemsPanel>
<ItemsPanelTemplate>
<WrapGrid Orientation="Horizontal"></WrapGrid>
</ItemsPanelTemplate>
</GridView.ItemsPanel>
<Image x:Name="templateImage" Source="{Binding ItemImage}" />
</GridView>
</Grid>
</DataTemplate>