Hi there,
I'm using the NodeListView control and, although it worked at some stage, it is not showing any items any more. Here is my code:
<div style="width:750px;height:700px; border:1px solid black;">
@Html.DiagramView((DiagramView)ViewBag.DiagramView)
</div>
<div style="width:200px; height:200px; position:relative; top:-702px; left:760px; border:1px solid black;">
@Html.Overview((Overview)ViewBag.Overview)
</div>
<div style="width:200px; height:498px; position:relative; top:-702px; left:760px; border:1px solid black;">
@Html.NodeListView((NodeListView)ViewBag.NodeListView)
</div>
In my controller I do this:
ViewBag.NodeListView = SetupNodeList(nodelistName);
and this:
private NodeListView SetupNodeList(string nodelistName)
{
NodeListView nodelist = new NodeListView(nodelistName);
nodelist.SetWidth(200);
nodelist.SetHeight(498);
var node1 = new MindFusion.Diagramming.ShapeNode();
node1.Brush = new MindFusion.Drawing.SolidBrush(Color.Yellow);
node1.Shape = Shapes.RoundRect;
nodelist.AddNode(node1, "Task");
var node2 = new MindFusion.Diagramming.ShapeNode();
node2.Brush = new MindFusion.Drawing.SolidBrush(Color.Orange);
node2.Shape = Shapes.Decision;
nodelist.AddNode(node2, "Decision");
var node3 = new MindFusion.Diagramming.ShapeNode();
node3.Brush = new MindFusion.Drawing.SolidBrush(Color.Green);
node3.Shape = Shapes.Ellipse;
nodelist.AddNode(node3, "Start");
var node4 = new MindFusion.Diagramming.ShapeNode();
node4.Brush = new MindFusion.Drawing.SolidBrush(Color.Red);
node4.Shape = Shapes.Ellipse;
nodelist.AddNode(node4, "End");
return nodelist;
}
When I run the app I only see an empty nodelistview. Like I said, this code worked before showing only those 4 items. When I debug and stop at the line in the HTML where the NodeListView is declared using the Razor syntax, ViewBag.NodeListView does have a value. It contains the 4 items I want displayed. Why is it not displaying it? Any help will be appreciated.