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.
Unfortunately, activation email could not send to your email. Please try again.

custom node

Thread ID:

Created:

Updated:

Platform:

Replies:

99667 Jun 3,2011 12:21 AM Jun 6,2011 07:40 AM Silverlight 1
loading
Tags: Diagram
trinadh
Asked On June 3, 2011 12:21 AM

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









Ramya Thirugnanam [Syncfusion]
Replied On June 6, 2011 07:40 AM

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



CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;