I have a complex template defining the RadPanelBar & RadPanelBarItem. I want to have these items be virtualized as I expect there to be about 1000 items and it takes enormous amount of time for my screen to load.
I know that RadPanelBar did not support virtualization previously, but is there a way to do it now? Below is my control template
------------------------------------------------------------------------------------------------------------------------------------------------------
<this:RadPanelBar x:Name="ContainerBar"
Grid.Row="1"
ItemsSource="{Binding Path=TheCollection}"
HorizontalAlignment="Stretch"
Background="{StaticResource StrongestBrush}"
Orientation="Vertical"
ExpandMode="Multiple"
SelectionMode="Multiple">
<telerik:RadPanelBar.ItemContainerStyle>
<Style TargetType="this:RadPanelBarItem"
BasedOn="{StaticResource ResourceKey={x:Type this:RadPanelBarItem}}">
<Setter Property="IsExpanded"
Value="{Binding Path=IsExpanded,
Mode=TwoWay}" />
</Style>
</telerik:RadPanelBar.ItemContainerStyle>
<telerik:RadPanelBar.ItemTemplate>
<HierarchicalDataTemplate ItemsSource="{Binding Path=TheMatchingItems}"
ItemTemplate="{StaticResource DesignerHotButtonTemplate}">
<TextBlock Text="{Binding Path=TheHotButtonType,
Converter={x:Static this:ButtonTypeConverter.TheInstance}}" />
</HierarchicalDataTemplate>
</telerik:RadPanelBar.ItemTemplate>
</this:RadPanelBar>
------------------------------------------------------------------------------------------------------------------------
---------------------- control template --------------------------------
<ControlTemplate TargetType="telerik:RadPanelBar">
<Grid>
<telerik:LayoutTransformControl x:Name="transformationRoot">
<Border BorderThickness="{TemplateBinding BorderThickness}"
BorderBrush="{TemplateBinding BorderBrush}"
Background="{TemplateBinding Background}">
<ScrollViewer x:Name="ScrollViewer"
IsTabStop="False"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
BorderBrush="Transparent"
BorderThickness="0"
Padding="{TemplateBinding Padding}"
Margin="0"
telerik:StyleManager.Theme="{StaticResource Theme}"
HorizontalScrollBarVisibility="Auto"
VerticalScrollBarVisibility="Auto"
CanContentScroll="True">
<ItemsPresenter />
</ScrollViewer>
</Border>
</telerik:LayoutTransformControl>
</Grid>
</ControlTemplate>