Get Content of RadTreeViewItem to Fill Full Size of Container
Environment
Product Version | 2019.2.618 |
Product | RadTreeView for WPF |
Description
How to stretch RadTreeViewItem content horizontally in order to fill the full size of the container.
Solution
Set the HorizontalContentAlignment property of RadTreeViewItem to Stretch.
To apply this globally to all RadTreeViewItems in the treeview, use the ItemContainerStyle property.
<telerik:RadTreeView.ItemContainerStyle>
<Style TargetType="telerik:RadTreeViewItem">
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
</Style>
</telerik:RadTreeView.ItemContainerStyle>
<telerik:RadTreeViewItem HorizontalContentAlignment="Stretch" />