The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
Case:-1
----------
I am a NodeCollection that contains 2 Custom Symbols and a Link that connects between these 2 Custom Symbols. When I move the nodes to a different position using the command "diagram.MoveNodes", the Custom Symbols move to the new location. The link stays connected to the Symbols, but it still moves thru the original position before the Symbols were moved. How can I programatically move the Nodes relatively?
Case:-2
-------
I am having a point Collection of the link that is connected between 2 symbols. I have to move these selected Symbols Programatically. When the nodes move to a new position I do know the new position of the Symbols. How do I update the PointF[] so that I can redraw the link again?
Which is better :- Moving a Link if possible or Updating the PointF[] programatically and redraw the link.
Pls let me know.
Regards,
Vinod
ADAdministrator Syncfusion Team December 8, 2005 09:57 PM UTC
Vinod,
When a symbol is moved, the links that connect to that symbol will be redrawn at the symbol''s new location. Hence if you have two symbols that are connected by a link, moving the two symbols will result in the link being adjusted to the new position. You do not have to explicitly select the link and apply a move to it as this should happen automatically.
The following code shows how to use the MoveCmd to displace two symbols that are connected by a link. Applying the move the link will automatically redraw the link at the new position between the symbols.
// Move Symbols sym1 and sym2 connected by a link
MoveCmd movcmd = new MoveCmd(50,50);
movcmd.Nodes.Add(sym1);
movcmd.Nodes.Add(sym2);
this.diagramComponent.Controller.ExecuteCommand(movcmd);
I tested this condition with the new v 4.1.0.0 beta and it appears to work perfectly.
Thanks,
Prakash Surendra
Syncfusion Inc.,