Why might a silverlight ListBox on Windows Phone not allow me scroll all the way down to the bottom?

末鹿安然 提交于 2019-12-25 01:09:07

问题


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>

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.


回答1:


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.



来源:https://stackoverflow.com/questions/3019716/why-might-a-silverlight-listbox-on-windows-phone-not-allow-me-scroll-all-the-way

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!