【发布时间】:2011-03-28 18:34:55
【问题描述】:
我有一个由 BusyIndicator 包装的 ListBox。 ListBox 很重,有时渲染可能需要 4 或 5 秒。
我想知道在 ListBox 呈现时使用 BusyIndicator 阻止 UI 的最佳方法是什么?
编辑:对不起,我没有把我的问题说得很清楚......请注意,ListBox 的 ItemsSource 绑定到视图模型中的 ObservabaleCollection。这个集合被快速填充。我猜真正减慢一切的是 UI 渲染,因为 ListBox 包含非常复杂的自定义 ListBoxItems。
ListBox 的 ItemsPanel 也是 WrapPanel。它不像默认的 VirtualisingStackPanel,所以我猜这可能是 ListBox 性能问题?
【问题讨论】:
标签: silverlight silverlight-3.0 listbox busyindicator