Hi,
as a newbie, I have been using your piping demo to build a model with similar characteristics.
I have made my model work, but have a problem with the link labels. The following code shows how I am adding pipes and its corresponding anodes to my model. Below a figure that shows the result. The text PartManager.PartBinding of Group to 56 appears, how can I hide this?
private void AddPipeToModel(Pipe pipe, ItemData headNode, ItemData tailNode, ObservableCollection nodes, ObservableCollection pipes)
{
PipeData pipeData = new PipeData();
pipeData.Index = int.Parse(pipe.Index);
pipeData.FromNode = headNode;
pipeData.ToNode = tailNode;
pipeData.Colour = Force.CommonLibrary.ForceColor.GetHexColor(System.Drawing.Color.Black);
if (pipe.Anodes.Count > 0)
{
AnodeData anodeSubGraphNode = new AnodeData();
anodeSubGraphNode.Key = pipe.Index;
anodeSubGraphNode.IsSubGraph = true;
anodeSubGraphNode.Location = new Point(double.NaN, double.NaN);
pipeData.LabelNode = anodeSubGraphNode.Key;
// Add anodes
foreach (Anode anode in pipe.Anodes)
{
AnodeData anodeNode = new AnodeData();
anodeNode.Key = "A" + anode.Index;
anodeNode.Index = int.Parse(anode.Index);
anodeNode.SubGraphKey = anodeSubGraphNode.Key;
nodes.Add(anodeNode);
}
nodes.Add(anodeSubGraphNode);
}
pipes.Add(pipeData);
}</i>