Node Link Line Direction

Hi,

Can you tell me how to put an diamond on both sides of a link line. I basically want the diamond to look like a port. I know how to display a diamond instead of the arrow but it's just that I need the diamond on both ends of the link. Auto layout places the link line automatically on either side of the node which is what I want. Also, how would I determine a mouse click on the diamond and which of the lines two diamonds was clicked on. Should I be using ports instead? if I were to use ports would the port also be laid out automatically by the layout manager or do you have to specify which side the port goes; which is not possible for me since I have no idea how things will be laid out.

If you have seen the ER Diagram that .Net Entity Frameworks renders that is the look I am going for.

Thanks
Rich

It sounds to me you just want to have a diamond arrowhead at both ends of each link. Certainly each node should just have one “port”, which is the whole node, with any number of links connecting to it along the outer edges. This is just what the ER Diagram sample does in GoXam.

Various kinds of arrowheads are demonstrated in the Link Demo sample.

  • How do you get the arrowhead on both ends of the link?

  • How do you determine which arrowhead is clicked on?

Thanks
Rich

Hi,

I think I am ok on the arrowhead on both ends of the link line. See below in bold blue. I am still working on the which arrow head was clicked on.

Thanks
Rich

   <DataTemplate x:Key="LinkTemplate">
        <go:LinkPanel go:Part.SelectionElementName="Shape" go:Part.SelectionAdorned="True"  
                go:Part.Reshapable="True" go:Part.Deletable="False">
            <go:Link.Route>
                <go:Route  Routing="AvoidsNodes" Curve="JumpOver" Curviness="1.0" />
            </go:Link.Route>
            <Path go:LinkPanel.IsLinkShape="True" x:Name="Shape"
          Stroke="LightSteelBlue" StrokeThickness="1.5" StrokeDashArray="2 1" />


<Polygon Name=“FromDiamond” Fill=“White” Stroke=“SteelBlue” StrokeThickness=“2.0” Points=“0 6 6 0 12 6 6 12” go:LinkPanel.Index=“0”

go:LinkPanel.Alignment=“1 0.5” go:LinkPanel.Orientation=“Opposite” />



</go:LinkPanel>

I don’t understand the purpose of detecting a mouse click on a particular arrow-head, instead of on any part of the link.

If you are looking to support reconnecting the link, just say:

<go:Link.Route> <go:Route . . . RelinkableFrom="True" RelinkableTo="True" /> </go:Link.Route>
If it’s for some other purpose, perhaps you could just define your own mouse event handler(s) on each arrowhead polygon.

Hi,

That’s exactly what I did and it works as needed. Once I figured out the polygon stuff I realized I could just add a mouse handler. I need to render link properties a little differently depending if it is the from side or the to side.

Thanks
Rich