VirtualCollection
VirtualCollection copied to clipboard
The VirtualizingWrapPanel dose not fit for windows phone
Hi, jack I added the file "VirtualizingWrapPanel.cs" in my Windows Phone project, and set the ListBox.ItemTemplate with the VirtualizingWrapPanel, but unfortunately the images that bounded to the listBox did not displayed. There were nothing on the screen.
I've not tried this code on Windows Phone. Are you able to share any of your project? Here are a couple of things to check, off the top of my head:
Have you set ItemWidth and ItemHeight on the VirtualizingWrapPanel?
Are you using this in conjunction with VirtualCollection? If so you need to remember to prefix your bindings in XAML with "Item." because VirtualCollection wraps each actual data item in a VirtualItem.
Thanks, after I set the ItemWindth and ItemHeight, the images displayed. But another qustion came. I could not scrolled the listbox. I had email you the demo project, looking forward you reply, thanks in advance!
I'm not sure why scrolling isn't working: I did find this though (http://stackoverflow.com/questions/2793167/scroll-gestures-not-passed-to-iscrollinfo-implementing-panel-in-windows-phone-7) which suggests that custom panels like VirtualizingWrapPanel which handle their own scrolling won't work correctly on WP7