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





Gets or sets the brush used to paint the item's shadow.

Namespace: MindFusion.Diagramming
Package: MindFusion.Diagramming

 Syntax

C#  Copy Code

public Brush ShadowBrush { get; set; }

Visual Basic  Copy Code

Public Property ShadowBrush As Brush

 Property Value

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

 Remarks

The shadow of an item has the same shape as the item, but is painted with a different brush and with some offset from the item position. This property specifies the brush used to paint the item's shadow.

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

 Example

The following code creates a shadow with fuzzy edges for the newly created node.

C#  Copy Code

private void diagram_InitializeNode(object sender, NodeEventArgs e)
{
    ColorBlend blend = new ColorBlend(3);
    blend.Colors = new Color[] {
        Color.Transparent,
        Color.FromArgb(128, Color.Black),
        Color.FromArgb(128, Color.Black) };
    blend.Positions = new float[] { 0f, 0.1f, 1f };

    PathGradientBrush brush = new PathGradientBrush(Color.White, Color.White);
    brush.InterpolationColors = blend;

    e.Node.ShadowBrush = brush;
    e.Node.ShadowOffsetY = 2;
    e.Node.ShadowOffsetX = 1.5f;
}

 See Also

DiagramItem Members
DiagramItem Class
MindFusion.Diagramming Namespace
Diagram.ShadowsStyle Property
EffectiveShadowBrush Property