This is a migrated thread and some comments may be shown as answers.

How to use VirtualizingWrapPanel where the items in the panel are of different sizes

3 Answers 282 Views
VirtualizingWrapPanel
This is a migrated thread and some comments may be shown as answers.
Rajani
Top achievements
Rank 1
Rajani asked on 03 May 2013, 03:01 AM
Hi,

I want to use the VirtualizingWrapPanel for a thumbnail view (similar to the File explorer view) that I'm building. However the thumbnails that the panel holds will not all be of the same size. Now the problem I'm facing is that the VirtualizingWrapPanel requires me to specify the ItemWidth. I cannot provide the ItemWidth because the width of the thumbnails are not always the same.. Is there any way to provide something similar to "auto" for ItemWidth? Any suggestions?

Currently I'm using the WPF VirtualizingStackPanel and it seems to work great but I'm wasting a lot of UI space and therefore want to use VirtualizingWrapPanel instead.

Thank you,
Rajani.

3 Answers, 1 is accepted

Sort by
0
Nick
Telerik team
answered on 06 May 2013, 10:48 AM
Hi Rajani,

Unfortunately the VirtualizingWrapPanel is designed to show equal sized items only. May I ask what exactly are you trying to achieve so we can suggest an alternative solution or suggest a viable workaround?

Hope to hear from you soon! 

Kind regards,
Nik
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Joshua
Top achievements
Rank 1
answered on 25 Jun 2016, 02:32 PM
I have this same problem. I'm trying to duplicate the "List" view from File Explorer. In that situation, all items have the same height but the widths are different depending on the file name. This means when oriented to grow horizontally that the number of "columns" should be known and a horizontal scrollbar should be viable. However, the user would not accept truncated file names in the view, nor do I know of a way to get the maximum visual width of any item to dynamically increase the common item width of the VirtualizingWrapPanel.
0
Yoan
Telerik team
answered on 29 Jun 2016, 02:51 PM
Hello,

I am afraid that our VirtualizingWrapPanel does not support items of different size. It is designed to show equal sized items only. Unfortunately, I can not suggest you an alternative control from our WPF suite.

Regards,
Yoan
Telerik
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Tags
VirtualizingWrapPanel
Asked by
Rajani
Top achievements
Rank 1
Answers by
Nick
Telerik team
Joshua
Top achievements
Rank 1
Yoan
Telerik team
Share this question
or