GoDigram for .NET Framework and .NET Core
Northwoods.Go Namespace / GoShape Class / Brush Property
In This Topic
    Brush Property (GoShape)
    In This Topic
    Gets or sets the brush used to fill the outline of this shape.
    Syntax
    [Category("Appearance")]
    [Description("The brush used to fill the outline of this shape.")]
    public virtual Brush Brush {get; set;}

    Property Value

    The Brush value may be null, in which case no background is painted. This value defaults to null.
    Remarks

    LinearGradientBrushes and TextureBrushes are drawn with their origin at the Position (top-left corner) of this shape.

    You must not modify the brush after you have assigned it. It is common to use the predefined brushes that are members of the Brushes class. For the simplest linear gradient and path gradient effects, you can just set the BrushColor, BrushForeColor, BrushMidColor, and BrushStyle properties. For common linear gradient and path gradient effects, more complicated than you get by setting those Brush... properties, we suggest that you use one of the Fill... methods. Finally, for the most sophisticated or complex kinds of gradient brushes, you may need to override this property to return the kind of value you need.

    When a linear gradient brush or a path gradient brush is drawn very small, due to a combination of small size and small GoView.GoView.DocScale, GoDiagram may substitute a solid brush or not draw anything at all, both for efficiency as well as to avoid GDI+ errors. When a path gradient brush is drawn very large, due to a combination of large size and large GoView.GoView.DocScale, GoDiagram may substitute a solid brush, both for efficiency as well as to avoid GDI+ errors.

    Currently serialization is limited to standard solid, hatch, and texture brushes and many kinds of simple linear gradient and path gradient brushes.

    See Also