Increasing the number of ports in a node

Dear GOXAM TEAM/ADMIN

I would like to know if it is possible to increase the number of ports (the place where an arrow enters and/or exits a particular
state) can be increased programatically.

We have a rich set of resizable controls in our application. Because
currently each state seems to be having only one point on each side of
it where the arrow can enter/exit the diagrams are becoming a huge
clutter when assume real-world proportions and dimensions.

As I just mentioned in your earlier question, it depends on whether you really want additional FrameworkElements representing ports or whether you just want links to connect at different points along a side of a rectangular node.

actually initially i need links to connect at different points any side of a node.

The default behavior is for the whole node to act as a single port for all links. You just need to add the following attached properties to the root element of your DataTemplate:

go:Node.FromSpot=“AllSides” go:Node.ToSpot=“AllSides”

Hi walter

pls see the screenshot the red arrows are showing the way links are being connected from and to a node.
also compare it with the present diagram on which i am working.

[QUOTE=rgautam]Hi walter

pls see the screenshot the red arrows are showing the way links are being connected from and to a node.
also compare it with the present diagram on which i am working.
[/quote]

[QUOTE=rgautam]Hi walter

pls see the screenshot the red arrows are showing the way links are being connected from and to a node.
also compare it with the present diagram on which i am working.
[/quote]

[QUOTE=rgautam][QUOTE=rgautam]Hi walter

pls see the screenshot the red arrows are showing the way links are being connected from and to a node.
also compare it with the present diagram on which i am working it has maximum 8 ports.
[/quote] [/quote]

It looks like what you want is not to have separate port elements, but to treat the whole node as a single port. That’s actually the default behavior. What some of the samples do, such as FlowChart and LogicCircuit, is provide several ports per node because they have logical and physical connection points – it matters exactly where a link connects.

But I suspect you don’t care exactly where a link connects to a node – they are all logically the same, and the actual points may change so that the diagram is easier to understand. This can be achieved by setting the go:Node.FromSpot and ToSpot properties to “AllSides” (or if you need, some subset of the sides). Some of the samples demonstrate this, such as EntityRelationship (ER Diagram) and the tanks in the Piping sample.

The LinkDemo sample lets you explicitly control those properties for selected nodes and links. I think it starts off with various nodes in different configurations.

Did you start with the FlowChart sample? If so I suggest you greatly simplify the Node DataTemplate(s) to remove all support for separate ports. In fact, it might be easier to just create new Node templates, copying only what you need, because you can also simplify the code-behind a lot too.

thanks for help !!!!!!