我需要在我的应用程序中填写注册表,我需要滚动,所以我做了以下
<ScrollViewer VerticalScrollBarVisibility="Visible" Height="780" MaxHeight="1800"
MaxWidth="477" VerticalAlignment="Top">
<ScrollViewer.Content>
<Grid Width="477" Height="728" MaxHeight="1800">
<!-- .......Form's Elements..... -->
</Grid>
</ScrollViewer.Content>
</ScrollViewer>
没有滚动,我错过了什么?
最佳答案
使用 ScrollViewer
时不应设置高度属性.如果您将其精简为以下内容,但仍然无法正常工作,那么您的项目中的其他因素正在阻止它工作。
<ScrollViewer>
<Grid>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<TextBlock Text="Hello" FontSize="320" />
<TextBlock Grid.Row="1" Text="World" FontSize="320" />
</Grid>
</ScrollViewer>
关于xaml - Windows Phone 7.1 中滚动查看器内的网格,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9290085/