This project has moved and is read-only. For the latest updates, please go here.

Distance between display border and diagram border

Mar 10, 2015 at 6:04 PM
Hello :-)
I've made a form including an Nshape display and a diagram, but other controls as well. I tried to reduce the distance (free space) between the border of my display and the border of my diagram to make its appearance more fitting, but sadly I haven't found a way to do this. I would like to have no distance at all between the borders (but still keep scrollbars available, if my diagram gets somewhat bigger). Could you please help me on that? How can I solve this problem?

Mar 11, 2015 at 8:55 AM
Edited Mar 11, 2015 at 8:55 AM
Responsible for this margin around the diagram sheet is a private constant in the display class (WinFormsUI\Display.cs):
private const int scrollAreaMargin = 1; // The distance between the diagram 'sheet' and the end of the scrollable area
For changing its value, you could...
  • alter the source code directly and re-compile the assemblies
  • use reflection and modify its value from outside.
Setting this value to 1 should bring the desired effect.
Mar 12, 2015 at 12:47 PM
Thank you very much :-)