Hi,
I want to add group to child nodes. I am simply using a Model (I am not using Diagram in code behind) For all the nodes getting created I want to add them in a group. Here’s a sample piece of code I am writing. I have Link and Node templates. Where do I get started from? How do I contain nodes in a group? Where should piece of code written and do I need to code behind?
<DataTemplate x:Key="NodeLinks">
<go:LinkPanel>
<Some Code>
</go:LinkPanel>
</DataTemplate>
<DataTemplate x:Key="ChildNodes">
<go:NodePanel go:Part.SelectionAdorned="True"
go:Node.Location="{Binding Path=Data.Location, Mode=TwoWay}"
Sizing="Auto">
<StackPanel>
<Image Source="{Binding Path=Data.Type, Converter={StaticResource TypeToSymbolConverter}}" />
<TextBlock Text="{Binding Path=Data.Title, Converter={StaticResource EmptyToNoNameConverter}}"/>
</StackPanel>
</go:NodePanel>
</DataTemplate>
<go:Diagram Name="Graph Sample"
Model="{Binding Model, Mode=TwoWay}"
LinkTemplate="{StaticResource NodeLinks}"
NodeTemplate="{StaticResource ChildNodes}">
<go:Diagram.Layout>
<go:TreeLayout Angle="90"
</go:Diagram.Layout>