Nevron Forum

Diagram Drawing Pane with Margins like in Visio (no grid lines)

https://www.nevron.com/Forum/Topic7075.aspx

By Dieter Schulten - Thursday, November 15, 2012

Hello, is there a way to have the drawing pane for the diagram
the margins (borders) look like in Visio. What i mean is a
white Frame arround the drawing pane without the grid.

Kind Regards, Dieter
By Nevron Support - Friday, November 16, 2012

Hi Dieter,

You can easily hide the grid using the following code:

drawingView.Grid.Visible = false;
By Dieter Schulten - Friday, November 16, 2012

Hi,

yes i can hide the grid, but i don't want to hide the grid.
I just don't wwant gridlines aroud the drawing pane like in visio.
I did add a screenshot to this post.

Kind Regards and thanx for your help, Dieter
By Nevron Support - Monday, November 19, 2012

Hi Dieter,

Thank you for the clarification. In order to achieve this effect you should modify the drawing document's frame style. Here's some sample code:

NStandardFrameStyle frameStyle = new NStandardFrameStyle();

frameStyle.InnerBorderColor = view.Grid.MajorLinesStrokeStyle.Color;

frameStyle.InnerBorderWidth = new NLength(1);

frameStyle.OuterBorderColor = ((NColorFillStyle)document.BackgroundStyle.FillStyle).Color;

frameStyle.OuterBorderWidth = new NLength(20);

document.BackgroundStyle.FrameStyle = frameStyle;

By Dieter Schulten - Monday, November 19, 2012

Perfect

Thanx, Dieter