【发布时间】:2014-01-23 16:40:14
【问题描述】:
我正在开发一个 WP8 应用程序,但我遇到了滚动问题。在我的页面中,我有一个网格和两个列表框。 你认为为什么? 我也尝试使用 ScrollViewer,但效果很好。
<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>
【问题讨论】:
标签: c# xaml windows-phone-8