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.

Fixed Symbols

Thread ID:

Created:

Updated:

Platform:

Replies:

68142 Sep 10,2007 11:04 AM Sep 11,2007 01:20 PM Windows Forms 1
loading
Tags: Diagram
Elia Chkayra
Asked On September 10, 2007 11:04 AM

hello again,

After drawing a diagram, i am saving it into a .edd file. then i am moving to another form and reload the same diagram. When this diagram reloads, i want to add symbol to it, but i want to disallow the user to edit ( move, rezise) the loaded diagram, only the newly inserted symbols can be edited while the saved ones cannot...
how can this be done?

J.Nagarajan [Syncfusion]
Replied On September 11, 2007 01:20 PM

Hi Elia,

Thanks for your continued interest in Syncfusion product.

If your intention is to disable the editstyle properties of the deserialized node then you have to set the Tag value to the dynamically created nodes. Please refer to the following code snippet

this.diagram1.LoadBinary("..\\..\\flowchart.edd");

Rectangle rect1 = new Rectangle(80, 800, 69, 45);
rect1.Tag = 1;
this.diagram1.Model.AppendChild(rect1);

Rectangle rect2 = new Rectangle(80, 1000, 69, 45);
rect2.Tag = 1;
this.diagram1.Model.AppendChild(rect2);

foreach (INode node in this.diagram1.Model.Nodes)
{
Node m_node = node as Node;
if (m_node.Tag == null)
{
m_node.EditStyle.AllowSelect = false;
m_node.EditStyle.AllowMoveX = false;
m_node.EditStyle.AllowMoveY = false;
m_node.EditStyle.AllowResize = false;
m_node.EditStyle.AllowRotate = false;
}
}

I have attached the sample that demonstrates this completely. In this sample you could not select the deserialized nodes.

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

Please refer to the sample and let me know if you have any questions.

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.

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.

;