xaml - Windows Phone 7.1 中滚动查看器内的网格

标签 xaml windows-phone-7.1 windows-phone-7

我需要在我的应用程序中填写注册表,我需要滚动,所以我做了以下

<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/

相关文章:

windows-phone-7 - 使用WP7.1 XNA项目中的WP7 XNA库作为引用

wcf - 我得到 For TransferMode.Buffered, MaxReceivedMessageSize 和 MaxBufferSize 必须是相同的值

c# - 使用具有相同结构的两个不同表

silverlight - 如何根据当前主题更改应用程序栏中的图标?

windows-phone-7 - Windows 手机 7 : "mailto:" in WebBrowser's html is not firing Navigating event

javascript - WebBrowser 中具有 Doctype 的不同 JavaScript 行为

.net - WPF 自定义命名空间不起作用

c# - 使用 Thread.sleep 让 UI 线程等待

c# - 来自字符串的 DependencyProperty

silverlight - 将组合框绑定(bind)到枚举...在 Silverlight 中!