Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

grid inside scrollviewer in windows phone 7.1

i need a registeration form within my application, i need scrolling 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's Elements..... -->
                 </Grid>
      </ScrollViewer.Content>
</ScrollViewer>

there is no scrolling, what am i missing?

like image 561
Alaa.Ali Avatar asked Feb 15 '12 08:02

Alaa.Ali


1 Answers

You shouldn't set the height properties when working with a ScrollViewer. If you strip it down to just the following and it still doesn't work, then it is something else in your project that is preventing it to work.

<ScrollViewer>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition />
        </Grid.RowDefinitions>
        <TextBlock Text="Hello" FontSize="320" />
        <TextBlock Grid.Row="1" Text="World" FontSize="320" />
    </Grid>
</ScrollViewer>
like image 102
Bryan Watts Avatar answered Nov 08 '22 11:11

Bryan Watts