NGNaganathan Ganesh Babu Syncfusion Team January 21, 2019 06:24 AM
By default, the diagram control selects the top of the node only while placing the multiple nodes in sample position. So only the surrounded rectangle has selected in your diagram. We suggest you use Node.EditStyle’s “AllowSelect” property to disable surrounded rectangle node and you can select elements which are surrounded by that rectangle node.
Syncfusion.Windows.Forms.Diagram.Rectangle rect = new Syncfusion.Windows.Forms.Diagram.Rectangle(0, 100, 100, 100);
rect.EditStyle.AllowSelect = false;
Naganathan K G
BCBlanca CalderonJanuary 21, 2019 06:36 AM
But this doesn't work for me because I want to select rectangle if I need moving it or change its properties (color, size...)
NGNaganathan Ganesh Babu Syncfusion Team January 21, 2019 07:14 AM
Could you please confirm us whether your requirement is to select the elements while clicking the element on inside the rectangle node and also select the rectangle (i.e.surrounded rectangle node) to change property (i.e. color,size etc) while clicking the border of the rectangle alone? if so, we will validate your requirement and update you a better solution.
Naganathan K G
BCBlanca CalderonJanuary 21, 2019 07:33 AM
My requirement is to select the elements like if all of them were indepent.
Sometimes I want to select the rectangle, sometimes a bitmapnode (that appear to be inside, but it's only another element in my diagram), sometimes a textnode...now if I want to select a bitmapnode "inside" my rectangle I have to move it and then I can select the element.
I want something like rectangle bring foward and the rest of element bring to front.
RTRamya Thirugnanam Syncfusion Team January 22, 2019 05:14 AM
Whether the requirement is to bring the rectangle node to front, then use the BringToFront method in diagram model. Pass the rectangle node as a parameter to the BringToFront method. So, the rectangle node comes to front of all the nodes.
Please refer to below code snippet for how to use BringToFront method
To send back the rectangle node, Please use the SendToBack method in diagram model as shown below.