I want to add link between two nodes,so I set the go:Node.LinkableFrom=“True” and go:Node.LinkableTo=“True”,but it doesn’t work.It is very odd;Following is my xaml:
<go:DataTemplateDictionary x:Key="NodeTemplateDictionary">
<DataTemplate x:Key="NodeTemplate2">
<go:NodePanel Sizing="Auto"
go:Part.SelectionAdorned="True" go:Part.SelectionElementName="ellipse">
<go:NodeShape go:NodePanel.Figure="RoundedRectangle" x:Name="ellipse"
Fill="Black" StrokeThickness="2"
go:Node.LinkableFrom="True" go:Node.LinkableTo="True" go:Node.PortId="" go:Node.LinkableDuplicates="True"
Cursor="Hand" />
</go:NodePanel>
</DataTemplate>
</go:DataTemplateDictionary>
<control:MyDiagram x:Name="myDiagram" Padding="10" Grid.Row="1" Model="{Binding GVM,Mode=TwoWay}" FilterSelectedNodeIDs="{Binding FilterSelectedNodeIDs}"
FilterSelectedEdgeIDs="{Binding FilterSelectedEdgeIDs}"
InitialPanelSpot="Center" InitialDiagramBoundsSpot="Center"
HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch"
InitialStretch="Uniform"
LinkTemplate="{StaticResource LinkTemplate}"
Background="White"
NodeTemplateDictionary="{StaticResource NodeTemplateDictionary}"
>
<control:MyDiagram.Layout>
<local:CustomLayout
ArrangesToOrigin="True"
/>
</control:MyDiagram.Layout>
<control:MyDiagram.CommandHandler>
<go:CommandHandler ZoomFactor="1.3"/>
</control:MyDiagram.CommandHandler>
<control:MyDiagram.DefaultTool>
<go:ToolManager WheelBehavior="Zooms"/>
</control:MyDiagram.DefaultTool>
<i:Interaction.Triggers>
<!--<i:EventTrigger EventName="MouseLeftButtonUp" >
<i:InvokeCommandAction Command="{Binding MouseLeftUpCommand}" CommandParameter="{Binding ElementName=myDiagram}" />
</i:EventTrigger>-->
<i:EventTrigger EventName="MouseRightButtonUp">
<i:InvokeCommandAction Command="{Binding MouseRightButtonUpCommand}" CommandParameter="{Binding ElementName=myDiagram}" />
</i:EventTrigger>
<i:EventTrigger EventName="MouseRightButtonDown">
<i:InvokeCommandAction Command="{Binding MouseRightButtonDownCommand}" CommandParameter="{Binding ElementName=myDiagram}" />
</i:EventTrigger>
</i:Interaction.Triggers>
</control:MyDiagram>
can any one help me?