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

Force UI Virtualization Programmatically?

1 Answer 56 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Chad
Top achievements
Rank 1
Chad asked on 29 Jun 2010, 12:29 PM
We have just started working with Telerik Silverlight controls and we have placed a RadTreeView control within a custom control.

The IsVirtualizing property of the RadTreeview is set to True.

When we resize our control that contains the RadTreeView, the RadTreeView does not automatically display nodes in the RadTreeView that were previously not visible as expected.  The only way for me to get the RadTreeView nodes to automatically display is to move the RadTreeView scrollbar.  Is there a way to force the RadTreeView to update what is displayed progrmmatically?  Perhaps we don't have UI Virtualization set up correctly?  Are there other RadTreeView properties we need to set?

I've tried binding the RadTreeView Height to the Height of the custom control and that doesn't work.

I've attached a screenshot of the problem.

1 Answer, 1 is accepted

Sort by
0
Kiril Stanoev
Telerik team
answered on 01 Jul 2010, 02:45 PM
Hi Chad,

I was unable to reproduce the issue. Except IsVirtualizing="True", the other prerequisite for the virtualization to work is RadTreeView to be placed in a container that does not measure with infinity (ex. StackPanel). What I mean is that in the scenario bellow, virtualization will not work:

<StackPanel>
    <Button />
    <telerikNavigation:RadTreeView IsVirtualizing="True" />
</StackPanel>

whereas:

<Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>

        <Button />
        <telerikNavigation:RadTreeView IsVirtualizing="True"  Grid.Row="1"/>
</Grid>

will have the same visual result, but virtualization will work.

I've attached a sample project that contains a TreeView with 1000 items placed in a dock pane. Please have a look at it and let me know if you manage to reproduce the issue. I'd be glad to further assist you.

On a side note, I'd like to inform you that we've just released an online tool that allows you to reduce the size of your Silverilght applications. For more information, please visit http://blogs.telerik.com/blogs/posts/10-06-10/telerik_assembly_minifier.aspx

Greetings,
Kiril Stanoev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
TreeView
Asked by
Chad
Top achievements
Rank 1
Answers by
Kiril Stanoev
Telerik team
Share this question
or