How to create TreeView content programmatically?
Posted: 07 Jul 2014, 12:56
We found one method SetItemSource() to create TreeView items, but how to use this method to create hierarchical collections?
Welcome to our official discussion site. You’ll find topics on features, bugs, development, and general support here
https://www.noesisengine.com/forums/
<Grid.Resources>
...
<HierarchicalDataTemplate DataType="DataCategory" ItemsSource="{Binding Children}">
<TextBlock Text="{Binding Name}" FontWeight="Bold" Foreground="Red"/>
</HierarchicalDataTemplate>
<DataTemplate DataType="DataElement">
<TextBlock Text="{Binding Name}"/>
</DataTemplate>
</Grid.Resources>