开发者

Silverlight 4 nested ListBox controls performance issue

I am working on a silverlight page that will have a horizontal list box that will contain a list of "cards". Each "card" contains a vertical list box with some text in it. However, I am running into a lot of performance issues. Has开发者_如何学运维 anyone experienced any performance issues with nested listboxes in the past?


If its a DataGrid then Paging can give good performance. If its ListBox then we should keep an eye on the count of data binded with listbox.

Are you trying to bind the full list on single shot from server ? Then this will definitely affect the performance.


UI Virtualization might help you. Try to use VirtualizingStackPanel (instead of StackPanel) as the ItemsPanel of your Listbox:

<ListBox>
    ...
    <ListBox.ItemsPanel>
        <ItemsPanelTemplate>
            <VirtualizingStackPanel />
        </ItemsPanelTemplate>
    </ListBox.ItemsPanel>
</ListBox>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜