Spread Windows Forms 12.0 Product Documentation
GradientSection Constructor(Color,Int32,Int32)
Example 


FarPoint.Win.Spread Assembly > FarPoint.Win.Spread.DrawingSpace Namespace > GradientSection Class > GradientSection Constructor : GradientSection Constructor(Color,Int32,Int32)
Color
Amount of the gradient
Amount of alpha-blending (transparency)
Creates a new color gradient section with the specified parameters.
Syntax
'Declaration
 
Public Function New( _
   ByVal color As Color, _
   ByVal amount As Integer, _
   ByVal alphaBlend As Integer _
)
'Usage
 
Dim color As Color
Dim amount As Integer
Dim alphaBlend As Integer
 
Dim instance As New GradientSection(color, amount, alphaBlend)
public GradientSection( 
   Color color,
   int amount,
   int alphaBlend
)

Parameters

color
Color
amount
Amount of the gradient
alphaBlend
Amount of alpha-blending (transparency)
Example
This example sets the gradient for the shape on the sheet.
FarPoint.Win.Spread.DrawingSpace.GradientSection grd = new FarPoint.Win.Spread.DrawingSpace.GradientSection(Color.Empty, 50,
255);
grd.Color = Color.Red;

FarPoint.Win.Spread.DrawingSpace.RectangleShape rs = new FarPoint.Win.Spread.DrawingSpace.RectangleShape();
rs.Name = "GradientRect";

rs.Gradient.Style = FarPoint.Win.Spread.DrawingSpace.GradientStyle.RadialFromCenter;
rs.Gradient.Sections[0] = grd;

fpSpread1.ActiveSheet.AddShape(rs);
Dim grd As New FarPoint.Win.Spread.DrawingSpace.GradientSection(Color.Empty, 50, 255)
grd.Color = Color.Red

Dim rs As New FarPoint.Win.Spread.DrawingSpace.RectangleShape
rs.Name = "GradientRect"

rs.Gradient.Style = FarPoint.Win.Spread.DrawingSpace.GradientStyle.RadialFromCenter
rs.Gradient.Sections(0) = grd

FpSpread1.ActiveSheet.AddShape(rs)
See Also

Reference

GradientSection Class
GradientSection Members
Overload List