Search
Modifying the Diagram Appearance

You can customize most of the diagram 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 of any format supported by the Microsoft.Maui.Graphics.IImage API - bitmap, jpeg, png or gif. 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 diagram 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 are painted using the brush specified via ShadowBrush.

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 properties specify what cursors are displayed at different situations: PointerCursor, MoveCursor, DisallowCursor, DrawLinkCursor, AllowLinkCursor, DisallowLinkCursor, HorizontalResizeCursor, VerticalResizeCursor, DiagonalResizeCursor, CounterDiagonalResizeCursor. MindFusion.Diagramming displays the PanCursor while panning  the diagram view. Set the CurrentCursor 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.