Last Updated: 22 Aug 2018 17:28 by Werner
Petar Mladenov
Created on: 11 Nov 2016 08:36
Category: TreeView
Type: Bug Report
TreeView: HeaderStringFormat property of RadTreeViewItem does not apply
Setting the HeaderStringFormat of RadTreeViewItem does not format the Header.

As a workaround, HeaderTemplate of RadTreeViewItem could be set which has TextBlock with StringFormat property set on its Text Binding.

 <DataTemplate x:Key="template">
                <TextBlock Text="{Binding ., StringFormat='Received ({0:N0})'}" />

Available in LIB version: 2016.3.1121
1 comment
Posted on: 22 Aug 2018 17:28
Just tried the same with 2018.2 still does not work - a workaround causes overhead and less readable xaml => StringFormat should work

                <telerik:RadTreeViewItem Header="{Binding InafModel.INafModel_Entities.Count, StringFormat=Entities ({0})}" 
                                         ItemsSource="{Binding InafModel.INafModel_Entities}"
                                         ItemTemplate="{StaticResource Entity_DataTemplate}"/>