Node into node


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">

                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="*" />
                    <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"
                    <Grid Grid.Row="1">
                        <ItemsControl ItemsSource="{Binding Path=Data.Children, Mode=TwoWay}" ItemTemplate="{StaticResource StateChildrenTemplate}" />

<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}" />

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

Basically you want to have a ListBox or similar thing inside your Node’s DataTemplate. It would be data-bound to your list of attributes.

Its ItemTemplate would be a DataTemplate that includes an element (perhaps the whole thing) that has a go:Node.PortId assigned with a data binding and that has other standard attached properties relating to ports set: go:Node.LinkableFrom=“True” go:Node.LinkableTo=“True” go:Node.FromSpot=“LeftRightSides” go:Node.ToSpot=“LeftRightSides”.

You might want to look at the Entity Relationship sample (“ER Diagram”). However, this does not attempt to have a port for each entity member.

Thanks i’ll try that