2014-01-23 2 views
0

WP8 앱을 개발 중이며 스크롤 문제가 있습니다. 내 페이지에는 그리드와 두 개의 목록 상자가 있습니다. 왜 당신의 의견으로? ScrollViewer를 사용해 보았지만 좋은 결과를 얻었습니다. 당신의 RowDefinitionWP8 ListBox가 스크롤되지 않습니다.

<Grid x:Name="LayoutRoot" Background="{StaticResource PhoneChromeBrush}"> 

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

    <TextBlock Name="txt" TextAlignment="Center" 
       FontWeight="Bold" 
       FontSize="36" Height="auto" Grid.ColumnSpan="2" Grid.Row="0"></TextBlock> 

    <ListBox Name="lstCasa" Grid.Column="0" Grid.Row="1"> 
     <ListBox.ItemTemplate> 
      <DataTemplate> 
       <StackPanel Orientation="Vertical"> 
        <Grid> 
         <Grid.ColumnDefinitions> 
          <ColumnDefinition Width="*" /> 
          <ColumnDefinition Width="*" /> 
         </Grid.ColumnDefinitions> 
        </Grid> 
        <TextBlock FontWeight="Bold" Text="{Binding Path=aaa}"/> 
       </StackPanel> 
      </DataTemplate> 
     </ListBox.ItemTemplate> 
    </ListBox> 
    <ListBox Name="lstFuori" Grid.Column="1" Grid.Row="1"> 
     <ListBox.ItemTemplate> 
      <DataTemplate> 
       <StackPanel Orientation="Vertical"> 
        <TextBlock FontWeight="Bold" Text="{Binding Path=bbb}"/> 
       </StackPanel> 
      </DataTemplate> 
     </ListBox.ItemTemplate> 
    </ListBox> 
</Grid> 

답변

2

Height="Auto" 호출 할 아무것도주지 않는 ScrollViewer

그것은 이봐 당신이 더 이상 표시 할 수있는 곳의 끝에 도달하고 그것의 "를 알려줄 수있는 경계를 필요로

스크롤링이 필요합니다. "

의미가 있습니까?

문제를 해결하려면 RowDefinition을 "*"또는 고정 높이 (Row 또는 ListBox) 또는 이에 상응하는 경계 지점을 설정할 수 있습니다.

희망이 도움이됩니다.

관련 문제