VirtualCollection icon indicating copy to clipboard operation
VirtualCollection copied to clipboard

The VirtualizingWrapPanel dose not fit for windows phone

Open HamGuy opened this issue 12 years ago • 3 comments

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.

HamGuy avatar Sep 18 '12 08:09 HamGuy

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.

samueldjack avatar Sep 24 '12 11:09 samueldjack

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!

HamGuy avatar Sep 25 '12 06:09 HamGuy

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

samueldjack avatar Sep 26 '12 17:09 samueldjack