New to Telerik UI for WPF? Start a free 30-day trial
Get Content of RadTreeViewItem to Fill Full Size of Container
Updated on Sep 15, 2025
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.
XAML
<telerik:RadTreeView.ItemContainerStyle>
<Style TargetType="telerik:RadTreeViewItem">
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
</Style>
</telerik:RadTreeView.ItemContainerStyle>
To apply it per item set the property directly on the RadTreeViewItem.
XAML
<telerik:RadTreeViewItem HorizontalContentAlignment="Stretch" />