problem how to display many data in itemsControl - ListBox?

kingmiddle

Senior Member
Sep 12, 2009
54
6
0
Broc
problem how to display a lot of data to a itemsControl - ListBox?


Hello everyone! I am student developers as on windows phone and I recontre a problem when I want to display in my listbox ItemsControl.

Let me explain the problem:

I said three itemsControl in my listbox;

<ListBox name="MyListBox" >
<ItemsControl name="item_BeforeHead" />
<ItemsControl name="item_Head" />
<ItemsControl name="item_Body" />
</ListBox >



After I get a "Http request" full source code of a web page and I cutting (parse) the contents into three parts: <Before head> <head> <body> to place them in the good items!
The problem is the big website containing more than 50,000 - 1000'000 characters. So more than 30,000 characters in each itemControls. And the problem is the display that's slowing my listbox! The movement is made by jerks ..

Y is there a better way to charge a lot of content and display it after?
Thank you very much in advance for your help, this was a moment I'm looking for this solution ...

And again sorry for my bad english;-)
 
Last edited:

sensboston

Recognized Developer
Nov 18, 2009
2,142
797
193
Boston, MA
Change your app design. The whole idea to display items 30,000 characters long is completely wrong (doesn't really matter how fast you are displaying that junk), your list/whatever become simple unreadable.
So, try to formulate your task requirements in correct way first, and look for correct solution after (4 example, if you are trying to display ebooks, there are a few possible solution etc.)
 

Marvin_S

Retired Recognized Developer
Dec 8, 2010
883
239
0
mhhh thank you ! But i found this :

http://stackoverflow.com/questions/6170640/lazy-loading-of-listbox-images-from-isolated-storage


And also this class : "LongListSelector" for windows phone 7
I highly doubt this will be beneficial to you as I believe this is also build on the standard listbox. If you really need to store that many items, think about implementing a database, and than let the listbox directly read the data out from the database and filter the amount of results down if needed.

But like sensboston said, don't know what u are trying to do, but who is gonna read 30.000 characters? Think about parsing the content first before you add it to the listbox, so get rid of all the unwanted stuff. By building a regex which will match all the stuff you need than add each match to the listbox/database.