Search
Modifying the Diagram Appearance

You can customize most of NetDiagram visualization effects.

Background

NetDiagram background area can be filled using a solid brush, gradient, texture or color specified by the BackBrush property. Background theme can also be an image set by the BackgroundImage property. The image can be any from the supported by the .NET System.Drawing.Image file formats  - metafiles, icons, bitmaps, jpegs or gifs. Background image can be centered, aligned to a corner of the control or document, tiled or stretched to cover the drawing area - depending on the BackgroundImageAlign property value. It is possible to paint the area outside Bounds using a distinct brush by setting the ExteriorBrush property.

Smoothing

The SmoothingMode property enables or disables antialiasing of lines and curves rendered in the NetDiagram view. The TextRenderingHint property enables or disables smoothing of text.

Shadows

By default, all diagram items have shadows drawn under them. If ShadowsStyle is set to OneLevel, the item shadows are drawn at the lowest Z-level under all items, which makes them look as on single Z-level. If it is set to ZOrder, each shadow is drawn immediately under its corresponding item, possibly covering parts of other items, which gives more 3D-like look to the diagram. If the style is set to OneLevel, no shadows are drawn. The shadows offset from items is specified by the ShadowOffsetX and ShadowOffsetY properties or the SetShadowOffset method. Shadows colors are painted as set by ShadowBrush property value.

Selection

The style of selection handles drawn around the active item can be set with the ActiveItemHandlesStyle property. Items in multiple selection have their handles drawn using the style specified through the SelectedItemHandlesStyle property. Disabled manipulation handles are painted using DisabledHandlesStyle when ShowDisabledHandles is enabled (see EnabledHandles). The Style property of the Selection class controls the way multiple selection is displayed.

Mouse Cursors

Different mouse cursor icons can be set to give context-sensitive feedback to users, prompting them if creation/modification of an item is possible. The following methods specify what kind of cursor is displayed at different situations: getPointerCursor, setPointerCursor, getMoveCursor, setMoveCursor, getDisallowCursor, setDisallowCursor, setDrawLinkCursor, getDrawLinkCursor, getAllowLinkCursor, setAllowLinkCursor, setDisallowLinkCursor, getDisallowLinkCursor, setHorizontalResizeCursor, setVerticalResizeCursor, setDiagonalResizeCursor, setCounterDiagonalResizeCursor. NetDiagram displays the PanCursor while panning the diagram view. Call setCurrentCursor if you need to change the cursor from a mouse movement related event handler.

Grid Settings

An alignment grid is drawn if the ShowGrid is set to true. The GridColor property specifies the color of grid points.