1
我正在開發一個UWP應用程序,我希望讓我的GridView以水平模式而不是默認垂直模式滾動。有什麼辦法可以做到嗎?GridView水平滾動(UWP)
這裏是我的代碼:
<GridView x:Name="HostListView" Grid.Row="2" Height="150" Margin="310,0,0,0"
ItemsSource="{Binding FilteredHosts}" SelectedItem="{Binding SelectedHost, Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
SelectionChanged="HostListView_SelectionChanged" IsSwipeEnabled="False">
<GridView.ItemTemplate>
<DataTemplate >
<StackPanel Margin="8" Width="220">
<TextBlock Text="{Binding Name}" Style="{StaticResource TitleTextBlockStyle}"
FontSize="15" TextWrapping="NoWrap"
MaxHeight="40" Foreground="White"/>
<TextBlock Text="{Binding Designation}" Style="{StaticResource CaptionTextBlockStyle}"
TextWrapping="NoWrap" Foreground="White"/>
</StackPanel>
</DataTemplate>
</GridView.ItemTemplate>
</GridView>
你想要多少行?單個或多個 –