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.

Adding or deleting Diagram symbol.

Thread ID:

Created:

Updated:

Platform:

Replies:

95828 Aug 3,2010 07:06 AM Aug 9,2010 08:30 AM Windows Forms 1
loading
Tags: Diagram
Ven
Asked On August 3, 2010 07:06 AM

Hi,

how do i determine when a new symbol or shape has been added, deleted or changed from one parent to another parent in syncfusion.winforms.diagram.

please provide some example.



Thanks and regards
Venkat.

Varalakshmi R.S [Syncfusion]
Replied On August 9, 2010 08:30 AM

Hi Venket,

Thank you for your interest in syncfusion products.

Adding, deleting or changing a new symbol or shape from one parent to another parent in syncfusion.winforms.diagram can be determine by using “NodeCollectionChanging” event which triggered when the node collection is edited. Please refer the following code snippet to achieve this.



private void Form1_Load(object sender, EventArgs e)
{

((DiagramViewerEventSink)diagramWeb1.EventSink).NodeCollectionChanged += new CollectionExEventHandler(Form1_NodeCollectionChanged)((DiagramViewerEventSink)diagramWeb1.EventSink).NodeCollectionChanging += new CollectionExEventHandler(Form1_NodeCollectionChanging);


RectangleF rect = new RectangleF(100, 100, 100, 100);
RichTextNode richText = new RichTextNode("", rect);
richText.Text = "Rich text box";

NodeCollection nodeStack = new NodeCollection();
nodeStack.Add(richText);
MessageBox.Show(nodeStack.Count.ToString());

}

private void Form1_NodeCollectionChanging(CollectionExEventArgs e)
{
MessageBox.Show("NodeCollectionChanging event fired");
}



Please refer the following documentation link to know more about NodeCollection events.
http://help.syncfusion.com/ug_83/User%20Interface/ASP.NET/Diagram/Documents/nodecollectionevents.htm

Please let us know if there are any concerns.

Regards,
Varalakshmi.R.S

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.

;