scrollviewer不会滚动到底部

时间:2013-12-19 08:19:24

标签: xaml windows-phone-8

如果有人可以帮助我会很棒。我目前有一个电话页面,我想显示图像,但不知何故我的滚动查看器没有滚动到底部我只能看到两行图像,之后滚动查看器不再进一步。 这是我的XAML:

<ScrollViewer x:Name="Details">
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="3*"/>
                            <ColumnDefinition/>
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition/>
                            <RowDefinition/>
                            <RowDefinition/>
                            <RowDefinition/>
                            <RowDefinition/>
                            <RowDefinition/>
                            <RowDefinition/>
                            <RowDefinition/>
                            <RowDefinition/>
                            <RowDefinition/>
                            <RowDefinition/>
                        </Grid.RowDefinitions>
                        <Rectangle Fill="Black" Opacity="0.5" Grid.ColumnSpan="2" Grid.RowSpan="8"/>
                        <StackPanel Margin="15,10,1,0" Grid.Column="0" Grid.Row="0">
                            <TextBlock Text="{Binding xxx.Address}" Foreground="White" FontSize="22" FontWeight="Bold" />
                            <TextBlock Foreground="White">
                        <Run Text="{Binding xxx.Zipcode}" />
                        <Run />
                        <Run Text="{Binding xxx.Location}" />
                            </TextBlock>
                        </StackPanel>
                        <Image Source="/Assets/xxx.png" Height="50" Grid.Column="1" Grid.Row="0" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,15,0,0" />
                        <StackPanel Grid.Row="2">
                            <TextBlock Text="{Binding xxxx.xxx}" Foreground="White" MinHeight="50" TextWrapping="Wrap" VerticalAlignment="Center" HorizontalAlignment="Left" FontWeight="Bold" Margin="15,10,1,0" FontSize="22" />
                            <TextBlock Text="xxxx" Foreground="White" TextWrapping="Wrap" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="15,0,1,10" />
                        </StackPanel>
                        <Image Source="/Assets/xxx.png" Grid.Row="2" Grid.Column="1" Height="50" Margin="10" />
                        <TextBlock Text="xxx:" Margin="15,10,1,0" Foreground="#FFD8051E" Grid.Column="0" Grid.Row="3"/>
                        <TextBlock Text="xxxx:" Margin="15,10,1,0" Grid.Column="0" Grid.Row="4" />
                        <TextBlock Margin="15,10,1,0" Grid.Column="1" Grid.Row="4" >
                            <Run Text="{Binding xxx}" />
                            <Run Text=" m" />
                        </TextBlock>
                        <TextBlock Text="xxxx:" Margin="15,10,1,0" Grid.Column="0" Grid.Row="5" />
                        <TextBlock Text="{Binding xxxx}" Margin="15,10,1,0" Grid.Column="1" Grid.Row="5" />
                        <TextBlock Text="xxxx:" Margin="15,10,1,0" Grid.Column="0" Grid.Row="6" />
                        <ItemsControl Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="7" ItemsSource="{Binding xxxx}">
                            <ItemsControl.ItemsPanel>
                                <ItemsPanelTemplate>
                                    <tool:WrapPanel />
                                </ItemsPanelTemplate>
                            </ItemsControl.ItemsPanel>
                            <ItemsControl.ItemTemplate>
                                <DataTemplate>
                                    <Image Margin="10" Source="{Binding .,Converter={StaticResource xxxxx}}" Height="100" Width="100" HorizontalAlignment="Left" VerticalAlignment="Top"/>
                                </DataTemplate>
                            </ItemsControl.ItemTemplate>
                        </ItemsControl>
                    </Grid>
                </ScrollViewer>

1 个答案:

答案 0 :(得分:0)

我认为问题出在你的ScrollViewer属性中。

应该有更多的定义

 <ScrollViewer Grid.Row="1"
 Name="Details"
 VerticalScrollBarVisibility="Visible" AllowDrop="False" ManipulationMode="Control">