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

Fixed Symbols

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?

1 Reply

J. J.Nagarajan Syncfusion Team September 11, 2007 05:20 PM UTC

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



Loader.
Live Chat Icon For mobile
Up arrow icon