We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

custom node

Hi,

How can i add custom nodes and attributes? I am able to add custom nodes in WPF but getting problem in silverlight.

Another problem, Its not allowing to Delete a selected node. i.e, DiagramCommandManager.Delete.Execute(diagramView.Page, diagramView); is not working. can you suggest?

Thanks,
trinadh









1 Reply

RT Ramya Thirugnanam Syncfusion Team June 6, 2011 11:40 AM UTC

Hi Trinadh,

Regarding to add the custom nodes ,this can be done by adding the created nodes to DiagramModel which is identical to both WPF and Silverlight. Please refer to the following Code Snippet.

Code Snippet:

Node nodeObject = new Node(Guid.NewGuid(), "Node1");
node.Shape = Shapes.RoundedSquare;
node.Width = 150;
node.Height = 50;
node.OffsetX = 250;
node.OffsetY = 100;
diagramModel.Nodes.Add(nodeObject);

With regards to Delete Command, The DiagramCommandManager has used to execute the commands in WPF only. with respect to Silverlight, the delete operation can be performed using the Context Menu or Keyboard delete key. Currently we do not have support to programmatically delete selected object using the Delete Command. To programmatically delete a Node, remove the node instance from the DiagramModel. This has been confirmed as a feature request and this will be implemented in our upcoming release. If you would like us to notify about the feature implementation then, you may create a Direct-Trac using our Direct-Trac Support system.

Here is the link, please login into http://www.syncfusion.com/Account/ and we will be happy to help you.

If the code snippet does not satisfy your requirement, please provide us the code snippet what you have tried to add the Custom Nodes.so that we were investigate further and provide you an appropriate solution.

Please let us know if you have any further queries and we will be happy to help you out.

Regards,
Ramya



Loader.
Live Chat Icon For mobile
Up arrow icon