LongListSelector Data Virtualization

后端 未结 2 1101
执笔经年
执笔经年 2020-12-19 07:40

Does LongListSelector support Data Virtualization? I read on several Blogs that it does, but can\'t get it to work.

Here is what I tried: I provided a <

相关标签:
2条回答
  • 2020-12-19 07:50

    As you said, the LongListSelector is still based around GetEnumerator even for when rendering IList types. Most likely the control would need to be rewritten to support the purpose. While blogs might say it support it, none of them says how, so I'm not inclined to believe them. The LongListSelector's default is to render all items.

    As for the loading of the data, it can be done progressive using a ObservableCollection. I got a example project that shows how to use a ObservableCollection in combination with the LongListSelector.

    Basically this could allow you to progressively add more groups and/or, more data to the groups, and the UI should update accordingly.

    0 讨论(0)
  • 2020-12-19 08:14

    I looked at the LongListSelector source code, it is NOT possible to virtualize the backing storage. The LongListSelector loads each item from the group list through a foreach loop.

    0 讨论(0)
提交回复
热议问题