Grid inside scrollviewer on windows 7.1 phone

I need a registration form in my application, I need a scroll, so I did the following

<ScrollViewer VerticalScrollBarVisibility="Visible" Height="780" MaxHeight="1800"
                  MaxWidth="477" VerticalAlignment="Top">
           <ScrollViewer.Content>
          <Grid Width="477" Height="728"  MaxHeight="1800">  
                  <!--   .......Form Elements..... -->
                 </Grid>
      </ScrollViewer.Content>
</ScrollViewer>

no scrolling, what am I missing?

+5
source share
3 answers

You cannot set height properties when working with ScrollViewer. If you divide it into a few below, and it still does not work, then this is not all that interferes with your project.

<ScrollViewer>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition />
        </Grid.RowDefinitions>
        <TextBlock Text="Hello" FontSize="320" />
        <TextBlock Grid.Row="1" Text="World" FontSize="320" />
    </Grid>
</ScrollViewer>
+5
source

Delete the ScrollViewer.Content part - part, I have an application that has this structure and it works fine:

<ScrollViewer x:Name="ContentScrollViewer" Margin="0,0,0,8">
    <Grid Height="562">
        <!-- My elements -->
    </Grid>
</ScrollViewer>
0
source

scrollviewer 780, - 728. ? , 780.

0

All Articles