How to Remove the Gray Area around a Diagram?

29 Feb 20161 minute to read

You can remove the unnecessary gray area added around a diagram by setting the ScrollVirtualBounds property as Empty. The following code example illustrates this.

//Remove the unwanted gray area around a diagram.

diagram1.View.ScrollVirtualBounds = RectangleF.Empty;
'Remove the unwanted gray area around a diagram.

diagram1.View.ScrollVirtualBounds = RectangleF.Empty;