简体   繁体   English

带有VirtualizingStackPanel的WP7列表框中的选择性虚拟化

[英]Selective Virtualization in WP7 Listbox with VirtualizingStackPanel

I am referring an app like Facebook WP7 app. 我指的是类似Facebook WP7应用的应用。 When we try to scroll a long list of the feed items. 当我们尝试滚动一长列提要项时。 Only the heading of an feed item seems to be visible and when the scroll is completed remaining details gets loaded. 似乎只有供稿项的标题,滚动完成后,其余详细信息将被加载。 If it is a normal Listbox where virtualization is enabled complete data disappears and all the controls seem to be recycled. 如果是启用了虚拟化功能的普通列表框,则完整的数据将消失,所有控件似乎都将被回收。 So in facebook app, I thought that the virtualization is happening on selective items. 因此,在Facebook应用程序中,我认为虚拟化正在某些项目上进行。 Am I right? 我对吗?

If yes, how to do a selective virtualization? 如果是,如何进行选择性虚拟化? and if I am wrong what is the app exactly doing? 如果我错了,该应用程序到底在做什么? Any resource regarding this will be helpful. 关于此的任何资源都将有所帮助。

Thanks in advance. 提前致谢。

As Willmell pointed out, this msdn link describes what Facebook is doing exactly. 正如Willmell所指出的,此msdn 链接描述了Facebook的确切功能。 The template of the listBoxItem will be switched while scrolling. 滚动时将切换listBoxItem的模板。

Try to look here . 尝试看看这里 This guide helps me to solve a similar problem. 本指南可帮助我解决类似的问题。

I believe that this is just how their data binding works. 我相信这就是他们的数据绑定的工作方式。

They get an initial list that contains the "headers" and some basic information, which they show. 他们将获得一个包含“标题”和一些基本信息的初始列表。 They then make more calls to grab the rest of the info. 然后,他们会拨打更多电话以获取其余信息。 When that info comes in, it updates in the view model and thru databinding shows up on the list. 收到该信息后,它将在视图模型中更新,并且数据绑定将显示在列表中。

I have apps that do that, and they behave similarly to how FB's listbox behaves. 我有执行此操作的应用程序,它们的行为类似于FB列表框的行为。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM