Hello,
I just got GoDiagram and I’m trying to have multiple nodes into a node. Here’s my quick DataTemplate
<!-- node template -->
<DataTemplate x:Key="NodeTemplate">
<Border Background="Gray" BorderBrush="Gray" BorderThickness="2" CornerRadius="3"
go:Part.SelectionAdorned="True" go:Part.Resizable="True"
go:Node.FromSpot="AllSides" go:Node.ToSpot="AllSides"
go:Node.Location="{Binding Path=Data.Location, Mode=TwoWay}"
go:Node.LinkableFrom="True" go:Node.LinkableTo="True">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid Grid.Row="0">
<TextBlock Text="{Binding Path=Data.Text, Mode=TwoWay}" HorizontalAlignment="Center" TextWrapping="Wrap" Margin="10" Cursor="Arrow"
go:Node.LinkableFrom="True" go:Node.LinkableTo="True"
go:Part.TextEditable="True"/>
</Grid>
<Grid Grid.Row="1">
<ItemsControl ItemsSource="{Binding Path=Data.Children, Mode=TwoWay}" ItemTemplate="{StaticResource StateChildrenTemplate}" />
</Grid>
</Grid>
</Border>
</DataTemplate>
<DataTemplate x:Key="StateChildrenTemplate">
<go:NodePanel go:Node.LinkableFrom="True" go:Node.LinkableTo="True" go:Node.LinkableDuplicates="True" go:Node.LinkableSelfNode="False">
<TextBlock Text="{Binding}" />
</go:NodePanel>
</DataTemplate>
Problem is when I try to link a “child node” to another “child node”, it seems to be linking the parents together.
I’ve tried using groups to but it doesn’t seems to be what I’m looking for. What I want to do is some sort of class diagram where I would be able to link classes and ALSO link one attribute to another one. Also I’m using GraphLinksModel is it the right one for what I want to do ? I also want to be able to link One “Class” to multiple other “Classes” and one “Attribute” to multiple other “Attributes”. Some guidance would be really appreciated.
Thanks for your help