Quantcast
Channel: Northwoods Software - Latest topics
Viewing all articles
Browse latest Browse all 7424

Integrating the SnappingTool in an existing Diagram

$
0
0

@lawrencelove wrote:

Let's say you had a more basic diagram such as the Flowchart example. I may be over-simplifying, but the Flowchart example uses the nodeTemplateMap to add some fairly basic nodes to the diagram/palette. These nodes are made up Panel objects, having Shape objects and TextBlock objects. These nodes can be connected by Link objects.

What I'd like to do is add the option of linking node directly to one another. Without getting into why one would do this, let's imagine that I wanted to connect two "Step" nodes without having a Link between them.

I've seen the Pipes example, and this illustrates what I'm looking for. In this example, each Node uses Geometry to define the Shape. If I could apply the SnappingTool concept to "Step" node, that would solve my problem.

Unfortunately, the Flowchart example does not incorporate the SnappingTool and the Pipes example does not use string arguments such as "Rectangle" to define the Shape.

What I'm trying to do meshes the two concepts, but combining the two samples has been troublesome. Can the SnappingTool be applied in the way I've described, or can snapping only be applied to simple shapes?

Assuming I can re-use the custom SnappingTool class from the Pipes example, how would I apply it to the "Step" node in the Flowchart example?

Posts: 3

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 7424