ASP.NET Pack Programmer's Guide
DiagramItem.Pen Property
See Also
 





Gets or sets the pen used to paint the frame of the item.

Namespace: MindFusion.Diagramming
Package: MindFusion.Diagramming

 Syntax

C#  Copy Code

public Pen Pen { get; set; }

Visual Basic  Copy Code

Public Property Pen As Pen

 Property Value

An instance of the MindFusion.Drawing.Pen class. The default value is null.

 Remarks

The property refers to a pen, with which the item frame is painted. When applied to links, the property specifies how their segments are painted.

When set to null, the pen object used to draw the item borders is derived from the item's Style, or from the diagram's current Theme.

 Example

The following example demonstrates how to create a pen with a linear gradient and assign it to the first node of a diagram:

C#  Copy Code

MindFusion.Drawing.Brush penBrush = new MindFusion.Drawing.LinearGradientBrush(
    Color.Bisque, Color.Blue, 0);
diagram.Nodes[0].Pen = new MindFusion.Drawing.Pen(penBrush);

Visual Basic  Copy Code

Dim penBrush As New MindFusion.Drawing.LinearGradientBrush( _
    Color.Bisque, Color.Blue, 0)
diagram.Nodes(0).Pen = New MindFusion.Drawing.Pen(penBrush)

 See Also

DiagramItem Members
DiagramItem Class
MindFusion.Diagramming Namespace
EffectivePen Property