Is the default list virtualized in WP7 Mango?

In August 2012, this article was published at http://msdn.microsoft.com/en-us/library/windowsphone/develop/hh286406%28v=vs.92%29.aspx , which outlines best practices for the database.

This article mentions that data virtualization in the list should be enabled and suggests following an article from August 2010.

"For more information about enabling data virtualization in ListBox data-related controls, see Improving ListBox Performance in Silverlight for Windows Phone 7: Data Virtualization "

However, I thought that list virtualization was enabled by default with what was released in the Mango version. It's right? Is the data list tied to an observable collection, virtualized by default?

+4
source share
1 answer

Ui is virtualized by default - so the list box reuses data tables for list items and displays only those list items that actually scroll to the view.

However, if you use observable union, then the data is not virtualized.

So, if you have a list of 1,000,000 elements, then all of them will be in memory, but only ui for some of them will be created and drawn.

To also virtualize data, you need to implement a custom alias, possibly also supporting inotifycollectionchanged. This implementation may, for example, use SQLite to simply load data items as they scroll.

+3
source

Source: https://habr.com/ru/post/1436446/


All Articles