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

Resize particular node alone in the selection list

Platform: WinForms |
Control: Diagram

Resize particular node alone in the selection list

Diagram allows you to resize a particular children in the selection list. It can be achieved through Diagram Model’s EventSink.SizeChanging event. This event is triggered while changing the size of the node.

The below code snippet is used for resizing a particular node in the selection list.


//Registering the SizeChanging event
Diagram.Model.EventSink.SizeChanging += EventSink_SizeChanging;
Private Sub EventSink_SizeChanging(ByVal evtArgs As SizeChangingEventArgs);
if (Diagram.View.SelectionList.Count > 1 && evtArgs.NodeAffected is Node && !(evtArgs.NodeAffected is PseudoGroup))
if (Diagram.View.SelectionList.IndexOf(evtArgs.NodeAffected as Node) == 0)
Node node = evtArgs.NodeAffected as Node;
evtArgs.Cancel = false;
NodeCollection collection = new NodeCollection();
for (var i = 0; i < Diagram.View.SelectionList.Count; i++)
for (var i = 0; i < Microsoft.VisualBasic.Collection.Count; i++)
evtArgs.Cancel = true;



'Registering the SizeChanging event
Diagram.Model.EventSink.SizeChanging += EventSink_SizeChanging
Private Sub EventSink_SizeChanging(ByVal evtArgs As SizeChangingEventArgs)
If Diagram.View.SelectionList.Count > 1 AndAlso TypeOf evtArgs.NodeAffected Is Node AndAlso Not(TypeOf evtArgs.NodeAffected Is PseudoGroup) Then
If Diagram.View.SelectionList.IndexOf(TryCast(evtArgs.NodeAffected, Node)) = 0 Then
Dim node As Node = TryCast(evtArgs.NodeAffected, Node)
evtArgs.Cancel = False
Dim collection As New NodeCollection()
For i = 0 To Diagram.View.SelectionList.Count - 1
Next i
For i = 0 To Microsoft.VisualBasic.Collection.Count - 1
Next i
evtArgs.Cancel = True
End If
End If

2X faster development

The ultimate WinForms UI toolkit to boost your development speed.
You must log in to leave a comment

Please sign in to access our KB

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

Up arrow icon

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

Live Chat Icon For mobile