RadTreeView with virtualization turned on, defines HierarchicalDataTemplates for its items.
In the template, the root panel is 32 pixels (or higher than the default TreeViewItemHeight - 24 px in OfficeBlackTheme). Scrolling the treeview, then maximizing the wpf window results in misplaced / incorrect height of treeviewitems.
Possible workaround:
Set the MinHeight property of RadTreeViewItem so that all its header content fits. Then set the item's VerticalContentAlignment to Stretch
<Style TargetType="telerik:RadTreeViewItem">
<Setter Property="MinHeight" Value="48" />
<Setter Property="VerticalContentAlignment" Value="Stretch" />
</Style>
Also following settings might help:
- setting fixed width/height of the RadTreeView
- setting ChildDefaultLength to 48 of every TreeviewPanel:
<telerik:RadTreeView.ItemsPanel>
<ItemsPanelTemplate>
<telerik:TreeViewPanel ChildDefaultLength="48" />
</ItemsPanelTemplate>
</telerik:RadTreeView.ItemsPanel>
<Style x:Key="ItemContainerStyle" TargetType="{x:Type telerik:RadTreeViewItem}">
<Setter Property="ItemsPanel">
<Setter.Value>
<ItemsPanelTemplate>
<telerik:TreeViewPanel ChildDefaultLength="48" />
</ItemsPanelTemplate>
</Setter.Value>
</Setter>