第一个ListView项目没有显示Windows Phone 8.1

时间:2015-07-01 20:55:47

标签: c# xaml windows-phone-8.1

我在这里描述了一个问题ListView in Windows Phone 8.1 Wobbles while scrolling though long list (XAML)

所以我通过该链接解决了这个问题,但是当我添加到我的XAML DataTemplate ListView Grid Width="{Binding ActualWidth, ElementName=Content}"之后,然后显示了ListView的第一项剂量,它根本没有渲染...我怎么能解决是什么?

1 个答案:

答案 0 :(得分:1)

我认为这是因为你建立了内容"的内容。在很早的事件中(如LoadState事件)。当它尝试绑定第一个项目时,ActualWidth可能为0.0。

因此,请尝试在页面加载的事件中分配itemsource,以确保ActualWidth具有有效值。

相关问题