我试图让 ScrollViewer 拉伸并适应屏幕的大小,但我没有管理,因为它仍然保持列表视图的大小。
有什么办法可以做到这一点?
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<ScrollViewer VerticalScrollBarVisibility="Visible" HorizontalScrollBarVisibility="Visible">
<ListView ScrollViewer.VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Hidden">
<ListView.View>
<GridView>
<!-- code -->
</GridView>
</ListView.View>
</ListView>
</ScrollViewer>
</Grid>