Hi,
I have attached a screenshot which illustrates my issue.
The text to the upper left of the diamond - Exclusive Gateway - was placed there using the following code:
Factory factory = diagram.Factory;
Shape gatewayShape;
if (GatewayType == "Exclusive")
gatewayShape = Shapes.BpmnDataBasedXor;
else if (GatewayType == "Parallel")
gatewayShape = Shapes.BpmnParallelFork;
else
gatewayShape = Shapes.Decision;
ShapeNode gatewayNode = factory.CreateShapeNode(0, 0, 20, 20, gatewayShape);
gatewayNode.Tag = "Gateway;" + GatewayID + ";" + GatewayName + ";" + GatewayType + ";" + taskID.ToString() + ";" + Link_Image_ID + ";" + Link_Image_Placement_ID + ";" + Link_Image_Segment_ID + ";" + LinkText + ";" + GatewayDecisionText;
gatewayNode.Id = "Gateway" + GatewayID;
gatewayNode.ToolTip = GatewayDesc;
gatewayNode.Font = new Font("Arial", 7, System.Drawing.FontStyle.Regular);
gatewayNode.TextFormat.Alignment = StringAlignment.Center;
gatewayNode.TextFormat.LineAlignment = StringAlignment.Center;
if (GatewayType == "Decision")
gatewayNode.Text = GatewayDecisionText;
else
gatewayNode.Text = GatewayName;
gatewayNode.LayoutTraits[SwimlaneLayoutTraits.Lane] = laneNumber;
gatewayNode.LayoutTraits[SwimlaneLayoutTraits.SortOrder] = nodeNumber;
nodeNumber++;
gatewayNode.AnchorPattern = GatewayAnchors;
float angle = 90;
gatewayNode.Brush = new MindFusion.Drawing.LinearGradientBrush(Color.WhiteSmoke, Color.LightBlue, angle);
// Now we'll place the gateway name to the upper left of the above shape
ShapeNode label = factory.CreateShapeNode(0, 0, 20, 8, Shapes.Rectangle);
label.Text = GatewayName;
label.Font = new Font("Arial", 8, System.Drawing.FontStyle.Regular);
label.TextFormat.Alignment = StringAlignment.Center;
label.TextFormat.LineAlignment = StringAlignment.Center;
label.IgnoreLayout = true; // Ensures that this shape remains with the parent shape
label.Transparent = true; // Don't show the shape itself, just the image
label.Pen = new Pen(Color.Black, 0F); // Don't show any border around the shape
label.Move(gatewayNode.Bounds.Left - 13, gatewayNode.Bounds.Top - 2);
label.AttachTo(gatewayNode, AttachToNode.TopLeft);
I also have code that places text on the links - in this example Yes and No. That works as well.
The issue is the text (and/or the shape) that is placed to the upper left of the diamond is being shown at the bottom of that shape as well.
I can see no where in my code where I could be doing this.
Any ideas?
I have also attached an xml export of the diagram.
Thanks in advance.
Jim