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
close icon

Diagram Resizing issue

Hello,
Inside a Usercontrol I have panel and inside panel I have essential diagram control.this diagram contains nodes.
Now if I place my usercontrol inside a form and maximize/minimize (resize), the resizing is not happening properly.I was trying anchoring and also setting heeight,width of panel graphview etc. Is there any proper way other than this so that my diagram get resized and redrawn when form resizes

Thanks in advance


2 Replies

AD Administrator Syncfusion Team December 12, 2008 12:39 PM UTC

Hi Aida,

Please follow these steps to get the desired behavior:

1. Create a New UserControl
2. In its properties, make the following changes:
AllowDrop = True;
3. Create a Panel
4. In its properties, make the following changes:
AllowDrop = True;
Dock = DockStyle.Fill
5. Drag and drop the Diagram control
6. In its properties, make the following changes:
AllowDrop = True;
Dock = DockStyle.Fill
7. Add some nodes to it
8. In the form load event, add the user control to the form as follows:
-------
UserControl1 mycontrol = new UserControl1();
this.Controls.Add(mycontrol);
mycontrol.Dock = DockStyle.Fill;
-------

Compile and run the sample. The resizing works perfectly.

For your convenience, I am attaching my sample file herewith.

Let me know if you need any further clarifications in this regard.

Happy Coding!

- Ajeet





AD Administrator Syncfusion Team December 12, 2008 12:40 PM UTC

Hi Aida,

The sample attached here!

Happy Coding!

- Ajeet




Diagram_WF_UsrControl_1a07c59b.zip

Loader.
Live Chat Icon For mobile
Up arrow icon