MultiRow Windows Forms > Developer's Guide > Using MultiRow > Cell Styles > Background Pattern |
You can set the background pattern in the cell style. The appearance supported in the background pattern is the same as the one supported by the .NET Framework (System.Drawing.Drawing2D.HatchStyle).
The following table shows examples of background patterns.
MultiRowHatchStyle | Image after Application |
Inherit | Fetch value from Parent |
None | None |
Horizontal | |
Vertical | |
ForwardDiagonal | |
BackwardDiagonal | |
LargeGrid | |
DiagonalCross | |
Percent05 | |
Percent10 | |
Percent20 | |
Percent25 |
This example sets the pattern color and style.
Imports GrapeCity.Win.MultiRow Dim textBoxCell1 As New TextBoxCell() textBoxCell1.Style.PatternColor = Color.LightBlue textBoxCell1.Style.PatternStyle = MultiRowHatchStyle.DiagonalCross GcMultiRow1.Template = Template.CreateGridTemplate(New Cell() { textBoxCell1 }) GcMultiRow1.RowCount = 10 GcMultiRow1.Rows(1).Cells(0).Style.PatternColor = Color.LightCoral |
using GrapeCity.Win.MultiRow; TextBoxCell textBoxCell1 = new TextBoxCell(); textBoxCell1.Style.PatternColor = Color.LightBlue; textBoxCell1.Style.PatternStyle = MultiRowHatchStyle.DiagonalCross; gcMultiRow1.Template = Template.CreateGridTemplate(new Cell[] { textBoxCell1 }); gcMultiRow1.RowCount = 10; gcMultiRow1.Rows[1].Cells[0].Style.PatternColor = Color.LightCoral; |