Some questions

Hi
I have some questions:
Can goaxm do auto-zoom out (auto-fiit) when there are many nodes?
I want to move the child nodes when i move the parent node. How can i do that?

What is the meaning of DefaultElectricalCharge, DefaultGravitationalMass, DefaultSpringLength, DefaultSpringStiffness. Can i change these properties for specific node?

Can i change ForceDirectedVertex for specific node?
Thanks

Set the Diagram’s (or the DiagramPanel’s) Stretch=“Uniform”. You’ll notice in Generic*.xaml that in the ControlTemplate for Overview the DiagramPanel.Stretch property is set that way.

Or set the InitialStretch property that way if you don’t want it to keep doing zoom-to-fit as the diagram’s bounds changes size.

[quote]I want to move the child nodes when i move the parent node. How can
i do that?[/quote]

I assume your graph is tree-structured, right? What you’ll need to do is install a custom DraggingTool that overrides the DraggingTool.ComputeEffectiveCollection method to include whatever additional nodes and links you want.

[quote]What is the meaning of DefaultElectricalCharge,
DefaultGravitationalMass, DefaultSpringLength, DefaultSpringStiffness.
Can i change these properties for specific node?[/quote]
Those are the default values for all of the interesting ForceDirectedVertexes or ForceDirectedEdge properties in the ForceDirectedNetwork that is being laid out.

Yes. Two choices: (1) construct the ForceDirectedNetwork and then change the values by setting the ForceDirectedVertex.Charge, .Mass, or .IsFixed properties or the ForceDirectedEdge.Length or .Stiffness properties. You can call ForceDirectedNetwork.FindVertex or FindEdge given a Node or a Link to get the corresponding ForceDirectedVertex or ForceDirectedEdge.

(2) Instead of setting those properties, you can override the ForceDirectedLayout.ElectricalCharge, GravitationalMass, IsFixed, SpringLength, or SpringStiffness methods to return the desired value.

Thanks for your reply. But zoom is not working when i set the diagrams Stretch=“Uniform” (Only one scrollbar is visible).

Ctrl-mouse-wheel and other kinds of zooming aren’t supposed to work when you set Stretch=“Uniform”, because it’s supposed to keep the whole diagram visible. Well, maybe you could zoom out, but in general, not in.

Maybe you want to do what I suggested: set InitialStretch=“Uniform”.

In version 1.1, you can set the DraggingTool property Inclusions=“SubTree” so that dragging a node will also drag all of the nodes and links coming out from that node.

That’s also demonstrated in the v1.1 IncrementalTree sample.