How can i do to set the location’s nodes
I think the go:Diagram.Layout value (a TreeLayout) is positioning all of the nodes.
Just remove that property element value and make sure each node that you want to see has a Location point.
it work :-)
Hi,
You need to specify different value(s) for DiagramLayout.Conditions.
Perhaps, in WPF:
<go:TreeLayout Conditions=“InitialOnly” . . . />
or in Silverlight:
<golayout:TreeLayout ConditionFlags=“InitialOnly” . . . />
unfortunly it dont work,
<golayout:TreeVertex Angle=“0” Alignment=“Start”
NodeIndent=“80” NodeSpacing=“10”
PortSpot=“BottomCenter” ChildPortSpot=“MiddleLeft” />
</golayout:TreeLayout.AlternateDefaults>
</golayout:TreeLayout>
</go:Diagram.Layout>
Thanks
That does work for me. There is an initial layout, and afterwards there is no layout even though the user modifies the graph.
However, perhaps you are referring to the layout that occurs when the model’s NodesSource collection is replaced when the user clicks the Load button in that sample. Basically, the PartManager notices when the graph may have changed dramatically, so it calls Diagram.LayoutDiagram, which forces a new layout. That’s typically what people want, but not in your case.
So in the future we’ll add some way to prevent that layout from happening.
For now, you can change the code that loads the new model to temporarily remove the Diagram.Layout:
private void Load_Click(object sender, RoutedEventArgs e) {
var model = myDiagram.Model as TreeModel<Employee, int>;
if (model == null) return;
Northwoods.GoXam.Layout.IDiagramLayout saved = myDiagram.Layout;
myDiagram.Layout = null;
try {
XElement root = XElement.Parse(Demo.MainPage.Instance.SavedXML);
model.Load<Employee>(root, "Employee");
} catch (Exception ex) {
MessageBox.Show(ex.ToString());
}
model.IsModified = false;
myDiagram.Layout = saved;
}
i will use the FlowChart sample, it respond to our needs for the moments,