Windows Phone Mango - ListBox or LongListSelector?

2019-02-24 00:52发布

问题:

Say if I need to display a list with lots and lots of records, which control is better? Or shall I say, which control has a better scrolling experience?

I've seen a lot of people reporting issues on this LongListSelector, is it really too buggy to use?

Hope someone can shed some light on this for me. Thanks in adv. Xin

回答1:

If you don't need grouping, I wouldn't use the LongListSelector. The virtualization support is easier to use/manage with a regular ListBox.

And as of Mango, the ListBox performance issues are no longer a issue. You get smooth scrolling with both.

So I think you should stick to the ListBox.



回答2:

The LongListSelector is used when you want to do more stuff with your list instead of just showing plain list items. LongListSelector supports grouping, which again supports easily jumping to another group. Both have visualization, so if you don´t need/want that, I would go for a simple ItemsControl and a scrollviewer(which is built in in the listbox and longlistselector).