Search
Modifying the Diagram Appearance

You can customize most of WpfDiagram visualization effects.

Background

The Diagram background area can be filled using a solid brush, gradient, texture or color patterns, by setting 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.

Shadows

Unlike the ActiveX and Windows Forms versions of the control, WpfDiagram does not provide a built-in shadow rendering. Instead, it relies on the WPF Effect classes for rendering shadows and other visual effects, such as blur. To enable any of these effects, set the Effect property of items to an instance of an Effect -derived class.

Selection

The style of selection handles drawn around the active item can be set through the ActiveItemHandlesStyle compound 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 properties specify what cursors are displayed at different situations: PointerCursor, MoveCursor, DisallowCursor, DrawLinkCursor, AllowLinkCursor, DisallowLinkCursor, HorizontalResizeCursor, VerticalResizeCursor, DiagonalResizeCursor, CounterDiagonalResizeCursor. WpfDiagram displays the PanCursor while panning  the diagram view. Set the OverrideCursor property if you need to set a cursor that does not depend on the current context.

Grid Settings

An alignment grid is drawn if the ShowGrid is set to true. The GridPen property specifies the pen used to draw grid points and lines.