简体   繁体   English

WP8列表框花费太多时间来渲染大量项目的UI

[英]WP8 Listbox takes too much time to render UI for large set of items

I have a large ObservableCollection containing text data which is populated to a listbox itemssource. 我有一个很大的ObservableCollection其中包含填充到列表框itemssource的文本数据。 Data fetching is fine, but Listbox rendering takes time, about 4-5 seconds. 数据获取很好,但是Listbox渲染需要大约4-5秒的时间。 Plus, I have a textbox where I want to filter out the listbox itemesource, if the text entered in the textbox starts with the item's text using Linq. 另外,如果在文本框中输入的文本以使用Linq的项目文本开头,则我有一个文本框,我想在其中过滤掉列表框itemesource。

List<Locality> l = Collection.FindAll(Locality=>Locality.name.ToLower().StartsWith(keywordlocation.Text.Trim()));

The filtering also takes time in the data set and is ruining user experience. 过滤还需要花费时间在数据集中,并且破坏了用户体验。 Any ideas how to decrease the rendering time and improve filtering. 关于如何减少渲染时间并改善过滤的任何想法。

Solved. 解决了。 Missed on a few details. 遗漏了一些细节。 VirtualizationStackpanel mode set to Recycling helped in rendering data faster and filtering out content. VirtualizationStackpanel模式设置为“ Recycling有助于更快地渲染数据和过滤内容。

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

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