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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Disable the nodes in a Layer.

Thread ID:





100390 Aug 3,2011 12:59 PM UTC Aug 5,2011 08:40 AM UTC WinForms 2
Tags: Diagram
John Previn Kumar
Asked On August 3, 2011 12:59 PM UTC

I want add rectangles in a layer and circles in a different layer. If I call Layer.Visible = false, all the nodes added to the corresponding layer is hidden. But when I call Layer.Enabled = False I could still work on nodes on that layer? How do I make all nodes in a layer "Read Only"? I should also be able to go to a mode in which I can do modifications.

John Previn Kumar
Replied On August 5, 2011 08:32 AM UTC

Should I loop thru all nodes in the layer and make Enabled as false? or is there a way to make entire Layer disabled?

Amsath Ali M [Syncfusion]
Replied On August 5, 2011 08:40 AM UTC


Thanks for your interest in Syncfusion products.

The Layer.Enabled property is used to indicate whether the layer should be active or not, where by default it is set to ‘False’. We suggest you to loop through all nodes in a layer and use the Node’s ‘Editstyle's’ properties to make nodes in a layer as ‘Readonly’. Please refer the below code snippet to achieve your requirement.
foreach (Node node in layer.Nodes)
node.EditStyle.AllowChangeHeight = false;
node.EditStyle.AllowChangeWidth = false;
node.EditStyle.AllowRotate = false;
node.EditStyle.AllowMoveX = false;
node.EditStyle.AllowMoveY = false;

For more information about Layers, please visit the below online UG link:

For your convenience, we have created a simple sample to achieve your requirement.
Please try the below sample and let us know if you have any queries.
Layer test1125834057.zip

Amsath Ali. M


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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