MultiRow Windows Forms > Developer's Guide > Using MultiRow > Cell Styles > Background Gradation |
You can set the background gradation in the cell style. The gradation supported in MultiRow is based upon the rendering feature of gradation used in the .NET Framework.
The following image shows the application of Color.Red and Color.Blue in the CellStyle.BackgroundGradientEffect.Colors property.
CellStyle.BackgroundGradientEffect.Direction | CellStyle.BackgroundGradientEffect.Style | Application Image |
Inherit | Horizontal | |
Inherit | Vertical | |
Inherit | DiagonalUp | |
Inherit | DiagonalDown | |
Forward | CornerUp | |
Forward | CornerDown | |
Inherit | Rectangular |
The following image displays the GradientEffect Editor.
The following code creates a gradation.
Imports GrapeCity.Win.MultiRow Dim gradientEffect1 As New GradientEffect() gradientEffect1.Colors = New Color() {Color.Green, Color.Yellow} gradientEffect1.Style = GradientStyle.Horizontal gradientEffect1.Direction = GradientDirection.Side Dim textBoxCell1 As New TextBoxCell() textBoxCell1.Style.BackgroundGradientEffect = gradientEffect1 GcMultiRow1.Template = Template.CreateGridTemplate(New Cell() {textBoxCell1}) GcMultiRow1.RowCount = 10 |
using GrapeCity.Win.MultiRow; GradientEffect gradientEffect1 = new GradientEffect(); gradientEffect1.Colors = new Color[] {Color.Green, Color.Yellow}; gradientEffect1.Style = GradientStyle.Horizontal; gradientEffect1.Direction = GradientDirection.Side; TextBoxCell textBoxCell1 = new TextBoxCell(); textBoxCell1.Style.BackgroundGradientEffect = gradientEffect1; gcMultiRow1.Template = Template.CreateGridTemplate(new Cell[] { textBoxCell1 }); gcMultiRow1.RowCount = 10; |