Windows Phone 7.1中的scrollviewer中的网格

Ala*_*Ali 5 xaml windows-phone-7 windows-phone-7.1

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

<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>
Run Code Online (Sandbox Code Playgroud)

没有滚动,我缺少什么?

Bry*_*tts 5

使用a时,不应设置高度属性ScrollViewer.如果将其拆分为以下内容并且仍然无法正常工作,则项目中的其他内容会阻止其工作.

<ScrollViewer>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition />
        </Grid.RowDefinitions>
        <TextBlock Text="Hello" FontSize="320" />
        <TextBlock Grid.Row="1" Text="World" FontSize="320" />
    </Grid>
</ScrollViewer>
Run Code Online (Sandbox Code Playgroud)