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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Dividing Diagram into Regions

Thread ID:

Created:

Updated:

Platform:

Replies:

68261 Sep 13,2007 03:56 PM UTC Sep 18,2007 08:36 PM UTC WinForms 1
loading
Tags: Diagram
Antonio Sacin
Asked On September 13, 2007 03:56 PM UTC

I would like to know if a diagram can be divided into regions for different types of nodes so that only nodes of that type can be dropped there. The regions I envision are vertical regions.

J.Nagarajan [Syncfusion]
Replied On September 18, 2007 08:36 PM UTC

Hi Antonio,

Thank you for your interest in Syncfusion product. In the present scenario of Diagram architecture we could not divide a diagram model into multiple region. However we can add multiple diagram models and we can view as a different region. To perform a particular node dropping please refer to the following code snippet

[C#]

this.diagram1.Controller.Model.EventSink.NodeCollectionChanging += new CollectionExEventHandler(EventSink_NodeCollectionChanging);
this.diagram2.Controller.Model.EventSink.NodeCollectionChanging+=new CollectionExEventHandler(EventSink2_NodeCollectionChanging);

void EventSink_NodeCollectionChanging(CollectionExEventArgs evtArgs)
{
if (evtArgs.Element is Syncfusion.Windows.Forms.Diagram.Ellipse)
{
Console.WriteLine("Working");
}
else
{
evtArgs.Cancel = true;
}
}

private void EventSink2_NodeCollectionChanging(CollectionExEventArgs evtArgs)
{
if (evtArgs.Element is Syncfusion.Windows.Forms.Diagram.Polygon)
{
Console.WriteLine("Working");
}
else
{
evtArgs.Cancel = true;
}
}


I have attached the sample that demonstrates this completely. In this sample you can drag drop only the Ellipse node in Diagram1 and the Diagram2, the polygon in Diagram2. You can download the sample from the following page.

http://websamples.syncfusion.com/samples/Diagram.Windows/F68261/main.htm

Please refer to the sample and let me know if this helps.

Regards,
Nagaraj

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.

Warning Icon 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.Close Icon

;