Spread Windows Forms 10.0 Product Documentation
Color Property (GradientSection)
Example 


Gets or sets the color of the gradient.
Syntax
'Declaration
 
Public Overridable Property Color As Color
'Usage
 
Dim instance As GradientSection
Dim value As Color
 
instance.Color = value
 
value = instance.Color
public virtual Color Color {get; set;}

Property Value

Color object containing the color for the gradient
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);
grd.AlphaBlend = 255;
grd.Amount = 50;
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)
grd.AlphaBlend = 255
grd.Amount = 50
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)
Requirements

Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows Server 2012 R2, Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8, Windows 8.1, Windows 10

See Also

Reference

GradientSection Class
GradientSection Members

 

 


Copyright © GrapeCity, inc. All rights reserved.