加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Windows > 正文

xaml – windows phone 7.1中的scrollviewer网格

发布时间:2020-12-14 01:52:41 所属栏目:Windows 来源:网络整理
导读:我需要在我的应用程序中注册表单,我需要滚动,所以我做了以下 ScrollViewer VerticalScrollBarVisibility="Visible" Height="780" MaxHeight="1800" MaxWidth="477" VerticalAlignment="Top" ScrollViewer.Content Grid Width="477" Height="728" MaxHeight="
我需要在我的应用程序中注册表单,我需要滚动,所以我做了以下

<ScrollViewer VerticalScrollBarVisibility="Visible" Height="780" MaxHeight="1800"
                  MaxWidth="477" VerticalAlignment="Top">
           <ScrollViewer.Content>
          <Grid Width="477" Height="728"  MaxHeight="1800">  
                  <!--   .......Form's Elements..... -->
                 </Grid>
      </ScrollViewer.Content>
</ScrollViewer>

没有滚动,我缺少什么?

解决方法

使用ScrollViewer时,不应设置高度属性.如果将其拆分为以下内容并且仍然无法正常工作,则项目中的其他内容会阻止其工作.

<ScrollViewer>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition />
        </Grid.RowDefinitions>
        <TextBlock Text="Hello" FontSize="320" />
        <TextBlock Grid.Row="1" Text="World" FontSize="320" />
    </Grid>
</ScrollViewer>

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读