Windows Phone 7 上的 Expression Blend 4:滚动困难

发布于 2024-09-27 11:58:11 字数 1530 浏览 1 评论 0原文

我正在使用 Expression Blend 4 来制作 Windows Phone 7 应用程序的原型。我有一个应该显示新闻故事的页面。我很难让它在模拟器中一直向下滚动。我只能滚动查看一些文本框。有时,当我将 ScrollViewer 调高时,我实际上可以在模拟器中滚动得更少。

这是 XAML:

<!--LayoutRoot is the root grid where all page content is placed-->
<Grid x:Name="LayoutRoot" Background="Transparent">
    <Grid.RowDefinitions>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="*"/>
    </Grid.RowDefinitions>

    <!--TitlePanel contains the name of the application and page title-->
    <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
        <TextBlock x:Name="ApplicationTitle" Text="NEWS" Style="{StaticResource PhoneTextNormalStyle}"/>
        <TextBlock x:Name="PageTitle" Text="New Physical Sciences Building: ‘Twenty-First Century Research’" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}" TextWrapping="Wrap" FontSize="40"/>
    </StackPanel>

    <!--ContentPanel - place additional content here-->
    <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
        <ScrollViewer Margin="0,0,8,-2332">
            <StackPanel>
                <Image Height="313" Width="454" Source="new physics building large.jpg"/>
                <TextBlock TextWrapping="Wrap"><Run Text=" really long text "/></TextBlock>
            </StackPanel>
        </ScrollViewer>
    </Grid>
</Grid>

我做错了什么?

I'm using Expression Blend 4 to prototype a Windows Phone 7 app. I have a page that is supposed to display a news story. I'm having difficulty getting it to scroll down all the way in the emulator. I can only scroll the see some of the text box. Sometimes, when I make the ScrollViewer taller, I can actually scroll less in the emulator.

Here is the XAML:

<!--LayoutRoot is the root grid where all page content is placed-->
<Grid x:Name="LayoutRoot" Background="Transparent">
    <Grid.RowDefinitions>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="*"/>
    </Grid.RowDefinitions>

    <!--TitlePanel contains the name of the application and page title-->
    <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
        <TextBlock x:Name="ApplicationTitle" Text="NEWS" Style="{StaticResource PhoneTextNormalStyle}"/>
        <TextBlock x:Name="PageTitle" Text="New Physical Sciences Building: ‘Twenty-First Century Research’" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}" TextWrapping="Wrap" FontSize="40"/>
    </StackPanel>

    <!--ContentPanel - place additional content here-->
    <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
        <ScrollViewer Margin="0,0,8,-2332">
            <StackPanel>
                <Image Height="313" Width="454" Source="new physics building large.jpg"/>
                <TextBlock TextWrapping="Wrap"><Run Text=" really long text "/></TextBlock>
            </StackPanel>
        </ScrollViewer>
    </Grid>
</Grid>

What am I doing wrong?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

隐诗 2024-10-04 11:58:11

为什么 ScrollViewer 的底部边距为 -2000?尝试设置 StackPanel 的宽度/高度......

Why does the ScrollViewer have a -2000 bottom margin? Try setting the width / height of the StackPanel instead...

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文