Question

I've got a Windows form with a ZedGraphControl, and for some reason whenever I rebuild it in Visual Studio while the gui builder is open, the control randomly resizes itself & changes its position. Here's a screen capture showing the behavior:

http://screencast.com/t/WxrLngp1VLf

*If I rebuild it a second time immediately after, it moves & resizes once again (in other words, it moves over & grows each and every time I build).

*I am not touching this control anywhere in my code; I just dropped it in the dialog and rebuilt.

*It behaves the same way in VS2008 and VS2013.

*If the gui builder is not opened when I build, it always remains as it should.

*I tried adding it within a panel (in case it was doing something weird based on properties of the container), but it behaves the same.

I'm totally stumped, and this makes it very cumbersome to work on the dialog - anytime I have to build I have to close the gui builder, build, then reopen it (otherwise, I have to keep manually moving the graph control back to where it was supposed to be)...

Was it helpful?

Solution

...Figured it out about 15 minutes after posting (d'oh!). The solution was to change the parent form's AutoScaleMode from None to Dpi. Looks like a bug in ZedGraph!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top