Hi,
Let me explain you in more details: you will need a dummy drawing document to place the dragged shape in, in order to get the connectors working. You can easily do this by in the AdaptTableFormat of the data object adaptor:
protected virtual NDrawingDataObject AdaptTableFormat(string tableName)
{
NDrawingDocument dummy = new NDrawingDocument();
NShape shape = null;
if (tableName == "1")
{
shape = new IfElseActivity(dummy);
}
else
{
shape = new NRectangleShape(0, 0, 50, 50);
}
NDrawingDataObject ddo = new NDrawingDataObject(dummy, new INDiagramElement[] { shape });
return ddo;
}
Do not forget to add the shape to the document as soon as it is created (for example in the constructor):
public IfElseActivity()
{
}
public IfElseActivity(NDrawingDocument document)
{
document.ActiveLayer.AddChild(this);
CreateBranches();
}
Best Regards,
Nevron Support Team