Hi Stoyan,
Quote:Another possibility is to directly set the links' first and last points in ControlPoints in response to some events instead of relying on AnchorPoints
That´s a good point for starting. And I think it´s easier to implement.
Actually I´m using this code to create my testnodes:
static public CompositeNode EntityCompCreate(Diagram diagram, ImageList images, string EntityName)
{
string content = @"
<SimplePanel>
<Shape Name=""Shape"" Shape=""Rectangle"" />
<Border Padding=""2"">
<GridPanel>
<GridPanel.Rows>
<GridRow Height=""5"" />
</GridPanel.Rows>
<GridPanel.Columns>
<GridColumn Width=""10"" />
<GridColumn Width=""Auto"" />
</GridPanel.Columns>
<Border Name=""myBorder"" Padding=""1"" Background=""#808000"">
<Text Text=""Hello world!"" TextColor=""Green"" GridColumn=""1""/>
</Border>
</GridPanel>
</Border>
</SimplePanel>";
CompositeNode node = new CompositeNode(diagram);
node.Bounds = new RectangleF(10, 10, 60, 10);
node.Components.Add(XmlLoader.Load(content));
node.Brush = new LinearGradientBrush(Color.RoyalBlue, Color.LightSkyBlue, 45);
diagram.Nodes.Add(node);
return node;
}
If I create two of these nodes in my diagram.
But I´m not able to wire them with the mouse.
So what must I do in order to do this with the mouse:
diagram1.Factory.CreateDiagramLink(node1, node2)
Greetz Dominik