6

私は次のように成長できるものを持ってGridいます:Height

<Grid.RowDefinitions>
    <RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
    <ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>


<Grid Name="Grid" Grid.Row="0" Grid.Column="0">

</Grid>

どうすれば上下にスクロールできますか?

Windows Phone 8 アプリです。

4

2 に答える 2

7

グリッドを次のように構成できます。

 <Grid x:Name="LayoutRoot" Background="Transparent">
       <Grid.RowDefinitions>
    <RowDefinition Height="120" />
    <RowDefinition Height="*" />
    <RowDefinition Height="3*" />
    <RowDefinition Height="5*" />
</Grid.RowDefinitions>
        <Grid> 
           ***content goes here****
        </Grid>
        <ScrollViewer VerticalScrollBarVisibility="Visible" Grid.Row="1">
            *****Put scalable content here*******
        </ScrollViewer>
        <Grid Grid.Row="0"> 
           ***content goes here****
        </Grid>
    </Grid>
于 2013-07-30T12:06:56.817 に答える
1

In short though you're not going to scroll a grid. You are going to create a grid set to the screen size or smaller. Then put a listbox inside it. You can scroll the listbox easily because that's what it does.

<Grid margin="0,0,0,0" width="480" hieght="800"> <!--These values probably need ajusted-->
  <ListBox height="800"> <!--Make sure that it is ENTIRLEY on the screen -->
    <TextBlock>Put a ton of text here and see that it scrolls</TextBlock>
    <Button>You can put anything in the list boxes</Button>
    <TextBox>Even Inputs</TextBox>
  </ListBox>
</Grid>

Another viable option that is mentioned below is a scroll viewer which works just as well.

于 2013-07-30T12:06:56.737 に答える