Switching Pane causes problems with Virtualized items

5 posts, 0 answers
  1. HDC
    HDC avatar
    214 posts
    Member since:
    Dec 2010

    Posted 31 Oct 2011 Link to this post

    I have a group of panes:
            <telerikDocking:RadSplitContainer Width="Auto"
              <telerikDocking:RadPaneGroup x:Name="MainContent">

    One of the panes contains RadTileView with IsVirtualized = True

    This the definition:

                  <DataTemplate telerik:ContainerBinding.ContainerBindings="{StaticResource bindings}">
                    <TextBlock Text="{Binding Position}" />
                    <ScrollViewer Name="scrollViewer1" Grid.Column="1" Grid.Row="1" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
                      <templates:Slide x:Name="SlideTemplate" SlideObjectSelectionChanged="SlideObjectSelectionChanged" />

    Templates:Slide is a usercontrol that contains a Canvas. The canvas control is used to load other controls into such as Textboxes and images.

    This all works fine as long as i stay on the same pane. But when i go to another Pane and switch back to this Pane, then the canvas control will be empty on all the "slides".

    When i turn virtualization off, the canvas will not be empty.

    I think this is a bug, i don't see a reason why switching the RadPane should clear the visual collection.

    A solution could be to force the TileView to reload the visual items, but i don't find a way to do this?

  2. Tina Stancheva
    Tina Stancheva avatar
    3298 posts

    Posted 03 Nov 2011 Link to this post

    Hello Peter,

    I wasn't able to reproduce the issue you described and I might be missing something. This is why I attached the sample solution I created to test your scenario. Can you please modify it to better illustrate your scenario and the issue? That will help us investigate the case and look for solutions.

    Thank you in advance for your cooperation.

    Tina Stancheva
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. DevCraft R3 2016 release webinar banner
  4. HDC
    HDC avatar
    214 posts
    Member since:
    Dec 2010

    Posted 07 Nov 2011 Link to this post

    Hi Tina,

    Sorry for not responding sooner. Thanks for your demo code.

    Your demo is a good starting point, but the problem i'm experiencing is related to the use of large .JPG files. We have a large number of JPG's that need to be read from the local disk, In size varying from 1.5MB to 3 MB.

    But I have realized that Silverlight simply is not equiped to handled large quantities of such files, regardless of the Telerik components.

    The problem is due to the limit's build into silverlight regarding memory usage (silverlight will not "swap" memory but simply crash with an out of memory message). I have even noticed that some heavy JPG's can't be opened without crashing Silverlight; ok; it was a 25MB file... but still. For this kind of images, we have to accept that we simply cannot handle them.

    For the smaller images though, it is also a problem. I will try to change your application later today to include large quantities of a heavier .JPG file, so you will notice that there really is an issue here.

    But just for your information, i have worked out a solution using the thumbnail hidden inside the JPG. It was quite a big feat to understand the JPG standard and reading the thumb, luckily there are quite a few coders out there attempting the same so i managed to piece a solution together. I can still not use virtualization because the whole process of reading a thumb from a .JPG is quite hefty and i noticed that in some case the virtualization would interfere with the processing especially when scrolling fast. However, using thumbs, i no longer need virtualization... i can a read a heap of JPG's before running out of memory and most JPG's taken from digital camera's will have a thumbnail.

    I do have one question though, instead of scrolling, i would like to use Paging in the control... it is far easier to control and easier for the user to navigate (easier to remember where he left off while browsing and easier to understand how many images there are). Do you have any ideas on how i could implement this in the control... is there any build-in support for paging? If not, could it be made a feature request?

    Best Regards,

  5. Zarko
    Zarko avatar
    755 posts

    Posted 09 Nov 2011 Link to this post

    Hi Peter,
    We are glad that you managed to workaround the problem with the images, as for the paging - could you take a look at this blog post and if you have more questions please feel free to ask.

    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  6. HDC
    HDC avatar
    214 posts
    Member since:
    Dec 2010

    Posted 09 Nov 2011 Link to this post

    Hi Zarko,

    That looks like a nice example, thanks a lot!

    I'll take a look at this later and see if it could enhance my application.

    Best Regards,


Back to Top
DevCraft R3 2016 release webinar banner