Hi All,
I have just downloaded the new Q3 release for the silverlight controls, because I was waiting for the new virtualization capabilities of the treeview.
I have just tried it, and it seems that there are some problems, but maybe it is issues from my side.
First of all, here is my code...
The tree view declaration :
<telerikNavigation:RadTreeView
x:Name="Tree"
ItemTemplate="{StaticResource TreeDataTemplate}"
ItemsSource="{Binding Path=Items}"
SelectedValuePath="{Binding Path=SelectedValuePath, Mode=TwoWay}"
SelectionMode="Single"
IsEditable="False"
SelectionChanged="Tree_SelectionChanged"
IsVirtualizing="True"
Grid.Row="4" />
The associated data template :
<core:HierarchicalDataTemplate x:Key="TreeDataTemplate"
ItemsSource="{Binding Children}"
core:ContainerBinding.ContainerBindings="{StaticResource ItemsCollection}">
<StackPanel Orientation="Horizontal" >
<Image Source="{Binding Picto}" />
<TextBlock Text="{Binding Label}" Margin="5,0" />
</StackPanel>
</core:HierarchicalDataTemplate>
and finally the data binding collection :
<core:ContainerBindingCollection x:Name="ItemsCollection">
<core:ContainerBinding PropertyName="IsSelected" Binding="{Binding IsSelected, Mode=TwoWay}" />
<core:ContainerBinding PropertyName="IsExpanded" Binding="{Binding IsExpanded, Mode=TwoWay}" />
<core:ContainerBinding PropertyName="Visibility" Binding="{Binding Visibility}" />
<core:ContainerBinding PropertyName="HasItems" Binding="{Binding HasItems}" />
</core:ContainerBindingCollection>
I am playing with the Visibility property of my binded objects to show or hide some nodes. The problem is that the right schroll bar of the treeview doesn't update with the visible items count. It takes the total items count. It means that I can have a scroll bar that lets the user think that there are a lot of items in my view, but in fact, only a few are visible (see attached screenshot)...
Is there a way to avoid that ?
Cheers,
Yoann