Paging support

Hi

I’m evaluating use of GoXam WPF for creating schematics (similar to electrical schematics).
Is it possible to create diagrams with support for paging / sheets using GoXam WPF?
Something like this: http://shrani.si/f/C/ZA/27tGT4jM/screenshot1.png

If it is possible, could you give me a few hints how to do it?

Thank you,
Zvonko

Yes, you can, but it will require some work.
I believe some customers have done this kind of work already for their particular applications.

If you are going to have a lot of these diagrams open at once, or if the diagrams may get very big (many pages each), and if your graphics are fairly simple (as that screenshot shows), you might find the performance better by using GoDiagram for WinForms instead of GoXam for WPF.

In either case you can create nodes and position them where you want.
Some nodes will need to be implemented with custom graphics; this is done differently in GoDiagram than in WPF.
I can’t tell whether how you would want to implement some of the nodes, depending on what interactive functionality you also expect regarding selection and dragging and copying.

You can add links with the appropriate properties (such as orthogonality) and connect with the nodes.
The links will probably have labels on them, such as “L1”.

For the “legends”, each product shows you how to create them if you want them to be part of the diagram itself.

Oh, and the background grid can be specified to draw “dots” at the desired intervals.

WPF is much easier to work with. Especially customization of elements and node. Painting in WinForms is painful.

We don’t need extra performance as our graphics is fairly simple. Something like in the screenshot. Rule of the thumb for performance estimation: about 20 elements up to 100 pages, with node links between pages.

Background is not very important (options: dots, gray grid, none). Legends are a must.

Interactive functionality required is sth. like typical circuit schematic software.

OK, so this will require some work but should not be hard.

One thing that I suspect that you would find useful is a way to have the vertical links be routed automatically to the right place. If you implement the horizontal lines as nodes, a simple customized Route class will get you what you want. Here it is:

// Customize the Route so that it always goes straight vertically, when possible. public class BarRoute : Route { public override Point GetLinkPoint(Node node, FrameworkElement port, Spot spot, bool from, bool ortho, Node othernode, FrameworkElement otherport) { Rect r = new Rect(node.GetElementPoint(port, Spot.TopLeft), node.GetElementPoint(port, Spot.BottomRight)); Point op = othernode.GetElementPoint(otherport, Spot.Center); bool below = op.Y > r.Y+r.Height/2; double y = below ? r.Bottom : r.Top; if (node.Category == "Bar") { if (op.X < r.Left) return new Point(r.Left, y); if (op.X > r.Right) return new Point(r.Right, y); return new Point(op.X, y); } else { return new Point(r.X+r.Width/2, y); } } protected override double GetLinkDirection(Node node, FrameworkElement port, Point linkpoint, Spot spot, bool from, bool ortho, Node othernode, FrameworkElement otherport) { Rect r = new Rect(node.GetElementPoint(port, Spot.TopLeft), node.GetElementPoint(port, Spot.BottomRight)); Point op = othernode.GetElementPoint(otherport, Spot.Center); bool below = op.Y > r.Y+r.Height/2; return below ? 90 : 270; } }
You can even implement those horizontal lines are regular Links, and then have each of those links use a LabelNode that is a transparent “bar” node to which the vertical links connect.

Another bit of customization is the definition of each of the kinds of nodes that you are using, such as switches. That will require some Path definitions which you can either write by hand or use a drawing tool.

Nice solution.

I played around with the GoXam a while ago and did a few things. Just to see it if it could fit our requirements. I created the LinksModel, LinksModelNodeData and LinksModelLinkData with automatic generation of connection points. With a few changes in WPF templates, here is my result: http://shrani.si/f/1T/w6/OVPv4sz/screenshot2.png

Still quite a lot to do, but it’s a start…