Once I build a RadDiagram I have basically one List of Items and one List of Links.
Now, would it be possible to Bind a TreeView with these two objects only?
See the screenshot attached for example. The Diagram consists of four objects linked together.
Now, Is it possible to have a TreeView representation of the Diagram like in the screenshot attached?
From the documentation seems to be that this cannot be done, unless I create dynamically a brand new List (i.e. TreeSource) for the tree from the Items and Links objects.
Where TreeSource would basically be a:
public
ObservableCollection<TreeViewNode> TreeSource;
public
class
TreeViewNode {
public
string
DisplayName {
get
;
set
; }
public
ObservableCollection<TreeViewNode> Nodes {
get
;
set
; }
}
And the XAML
<HierarchicalDataTemplate x:Key="TreeViewTemplate" ItemsSource="{Binding Nodes}" >
<TextBlock Text="{Binding DisplayName}"/>
</HierarchicalDataTemplate>
<
telerik:RadTreeView
x:Name
=
"tree"
ItemsSource="{Binding TreeSource}"> ItemTemplate="{StaticResource TreeViewTemplate}"