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

4 posts, 0 answers
  1. Rajani
    Rajani avatar
    14 posts
    Member since:
    Feb 2013

    Posted 02 May 2013 Link to this post


    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,
  2. Nick
    Nick avatar
    593 posts

    Posted 06 May 2013 Link to this post

    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,
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. Joshua
    Joshua avatar
    7 posts
    Member since:
    May 2011

    Posted 25 Jun 2016 Link to this post

    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.
  4. Yoan
    Yoan avatar
    1213 posts

    Posted 29 Jun 2016 Link to this post


    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.

    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Back to Top