Hello,
The diagram control in the designer correctly resizes and shows the rulers and scrollbar in its full width, however, when ran, the diagram gets cut off by whitespace. The control is sized to be the full size of its parents container.
I have provided my source code so you can see the issue and images below.
Thank you
Hi Green,
Reported Issue: Unwanted white space is visible when maximizing the diagram window.
We have validated the reported issue with the provided images and files. We suspect that the diagram size was too small compared to the region. Therefore, we increased the diagram size at the sample level, and it now works fine. Please find the updated sample attached.
Regards,
Arun Kumar S
Thank you for the reply and the modification to the sample repo.
I have confirmed that
this.housingPlanDiagram.Size = new System.Drawing.Size(1920, 1080);
Fixed the issue with the scaling, and it now works perfect. Thank you!
Hi Cory Green,
You are welcome. We are glad to know that the reported problem
has been resolved. Please let us know if
you require any further assistance on this. We will be happy to assist you.
Regards,
Preethi R
Is there any method that needs to be invoked so this designer property doesn't have to be changed 24/7 so that it is correctly sized for when the window is maximized? I attempted to hook it into the Resize event of my form and it doesn't change the size. Why is it only when its first created is it that size
Hi Green,
Reported Issue: Diagram size is not updating when resizing it in the Form's Resize event.
Based on your latest update, we suspect that you are trying to update the diagram’s size during the form’s resize event, but it is not being updated. We have attached a video demonstrating the replicated issue for your reference. Could you please confirm if this matches your issue?
If we have misunderstood your query, please provide a video reference. This will help us validate and understand the issue more clearly
Regards,
Arun Kumar S
Yes that is the exact issue. The problem is during runtime it will not resize at all showing those white boxes. Its more of an annoyance because I can fix it using the designer, but its odd that it only takes in that size at the beginning when the components are initialized. I have to manually go back in the Designer.cs and modify the size component anytime I make a layout change.
Here's a video on my end: https://streamable.com/zoff63
Hi Green,
Reported Issue: Diagram size is not updating when resizing it in the Form's Resize event.
We are able to reproduce the reported issue. We are currently investigating to identify the root cause and will update you with more details soon.
Regards,
Arun Kumar S
Hi Green,
Reported Issue: Diagram size is not updating when resizing it in the Form's Resize event.
We are trying to reproduce the reported issue using a simple sample. However, in this sample, we are unable to reproduce the issue. The problem seems to occur only in your sample. We have validated your sample to identify the root cause of the issue, but so far, we have not been able to find it.
In your sample, the diagram size value is being updated, but the view is not reflecting the change. We have also manually tried updating the diagram view using additional properties, but the view still does not update.
We have provided the tested sample for your reference. Could you please try to reproduce the reported issue using the provided sample?
Regards,
Arun Kumar S