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

Switching Pane causes problems with Virtualized items

4 Answers 63 Views
TileView
This is a migrated thread and some comments may be shown as answers.
HDC
Top achievements
Rank 1
HDC asked on 31 Oct 2011, 01:56 PM
I have a group of panes:
<telerikDocking:RadDocking.DocumentHost>
        <telerikDocking:RadSplitContainer Width="Auto"
                                          Visibility="Visible">
          <telerikDocking:RadPaneGroup x:Name="MainContent">
          </telerikDocking:RadPaneGroup>
        </telerikDocking:RadSplitContainer>
      </telerikDocking:RadDocking.DocumentHost>

One of the panes contains RadTileView with IsVirtualized = True

This the definition:

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

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?






4 Answers, 1 is accepted

Sort by
0
Tina Stancheva
Telerik team
answered on 03 Nov 2011, 09:57 AM
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.

Regards,
Tina Stancheva
the Telerik team

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

0
HDC
Top achievements
Rank 1
answered on 07 Nov 2011, 08:23 AM
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,

Peter
0
Zarko
Telerik team
answered on 09 Nov 2011, 05:13 PM
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.

Greetings,
Zarko
the Telerik team

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

0
HDC
Top achievements
Rank 1
answered on 09 Nov 2011, 08:53 PM
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,

Peter

Tags
TileView
Asked by
HDC
Top achievements
Rank 1
Answers by
Tina Stancheva
Telerik team
HDC
Top achievements
Rank 1
Zarko
Telerik team
Share this question
or