NetDiagram Programmer's Guide
DiagramItem.Brush Property
See Also
 





Gets or sets the brush used to fill the interior of this item.

Namespace: MindFusion.Diagramming
Package: MindFusion.Diagramming

 Syntax

C#  Copy Code

public Brush Brush { get; set; }

Visual Basic  Copy Code

Public Property Brush As Brush

 Property Value

An instance of a MindFusion.Drawing.Brush-derived class. The default value is null.

 Remarks

This property refers to a brush with which an item is painted. You can assign to it an instance of one of the following classes: HatchBrush, LinearGradientBrush, PathGradientBrush, SolidBrush or TextureBrush, located in the MindFusion.Drawing namespace. When applied to links, the property defines how arrowheads interior is painted.

When set to null, the brush object used to paint this item is derived from the item's Style, or from the diagram's Theme.

 Example

The following example demonstrates how to create a LinearGradientBrush and assign it to the first node of a diagram:

C#  Copy Code

diagram.Nodes[0].Brush = new MindFusion.Drawing.LinearGradientBrush(
    Color.Yellow, Color.BurlyWood, 20);

Visual Basic  Copy Code

Diagram.Nodes(0).Brush = New MindFusion.Drawing.LinearGradientBrush( _
    Color.Yellow, Color.BurlyWood, 20)

 See Also

DiagramItem Members
DiagramItem Class
MindFusion.Diagramming Namespace
EffectiveBrush Property