为什么 Windows Phone 上的 Silverlight ListBox 不允许我一直向下滚动到底部? [英] Why might a silverlight ListBox on Windows Phone not allow me scroll all the way down to the bottom?

查看:25
本文介绍了为什么 Windows Phone 上的 Silverlight ListBox 不允许我一直向下滚动到底部?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在网格中有一个 ListBox,它在页面加载时获取数据绑定...非常简单.我遇到的问题是,在框数据绑定后,我可以滚动……但不是一直滚动到列表底部.它会停止一两个项目,并且不再让我滚动.这是列表框 XAML:

I have a ListBox in a grid that gets databound when the page loads... pretty straightforward. The problem I'm having is that, after the box is databound, I can scroll... but not all the way to the bottom of the list. It stops an item or two short and won't let me scroll anymore. Here's the listbox XAML:

<Grid x:Name="ContentGrid" Grid.Row="2">
        <ListBox x:Name="lbFeed" ItemsSource="{Binding Items}" SelectionChanged="lbFeed_SelectionChanged" VerticalAlignment="Top" Width="480">
            <ListBox.ItemTemplate>
                <DataTemplate x:Key="MyDataTemplate">
                    <StackPanel Orientation="Vertical" Width="430">
                        <TextBlock Text="Some text" TextAlignment="Center" />
                    </StackPanel>
                </DataTemplate>
            </ListBox.ItemTemplate>
        </ListBox>
    </Grid>

我可以发布更多代码,但我仍然对 XAML 感到不知所措,我不确定是什么原因导致了这种情况.如果您需要更多背景信息,请告诉我,我会在此处添加.

I can post more code, but I'm still getting my feet wet in XAML and I'm not sure what might be causing this. If you need more context, let me know and I'll add it here.

推荐答案

如果您碰巧有不固定高度的行,这是 ctp 发布阶段的一个已知问题.如果是这种情况,您可能会注意到您的滚动也有点紧张.如果您的应用出现这种情况并且一切都已解决,请暂时修复您的内容高度.

This is a known issue at this stage of ctp release if you happen to have rows that are not fixed height. If this is the case you will likely notice your scrolling is a bit jittery too. Fix the height of your content for now if this is the case for your app and all is resolved.

这篇关于为什么 Windows Phone 上的 Silverlight ListBox 不允许我一直向下滚动到底部?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆