LinearGradientBrush

BrushReferences
Brush with a linear gradient at an angle

Constructors

LinearGradientBrush

#
public LinearGradientBrush(Color startColor, Color endColor, PointF startPoint, PointF endPoint)
Initializes a new instance of the LinearGradientBrush class between two points
startColor (Color)Start color for the gradient
endColor (Color)End color for the gradient
startPoint (PointF)Start point for the gradient
endPoint (PointF)End point for the gradient

LinearGradientBrush

#
public LinearGradientBrush(RectangleF rectangle, Color startColor, Color endColor, float angle)
Initializes a new instance of the LinearGradientBrush class with a given rectangle and angle
rectangle (RectangleF)Rectangle to define the area of the gradient
startColor (Color)Start color for the gradient
endColor (Color)End color for the gradient
angle (float)Angle of the gradient, in degrees

Properties

ControlObject

public object ControlObject { get; set; }
Gets or sets the control object for this widget
inherited fromBrush

Handler

#
public override object Handler { get; }
Gets the platform handler object for the widget

Instantiator

#
public static Func<Color, Color, PointF, PointF, LinearGradientBrush> Instantiator { get; }
obsolete: Use new LinearGradientBrush() instead
Gets a delegate to instantiate LinearGradientBrush objects

Transform

#
public IMatrix Transform { get; set; }
Gets or sets the transform to apply to the gradient

Wrap

#
public GradientWrapMode Wrap { get; set; }
Gets or sets the wrap mode for the gradient

Methods

Dispose

public void Dispose()
Releases all resource used by the Brush object.
inherited fromBrush
Remarks: Call Brush.Dispose() when you are finished using the Brush. The Brush.Dispose() method leaves the Brush in an unusable state. After calling Brush.Dispose(), you must release all references to the Brush so the garbage collector can reclaim the memory that the Brush was occupying.

Dispose

protected virtual void Dispose(bool disposing)
Disposes the brush
inherited fromBrush
disposing (bool)If set to true dispose was called explicitly, otherwise specify false if calling from a finalizer