GrapeCity MultiRow Windows Forms Documentation
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

Using the Designer

  1. Select the cells that need a background pattern to be set (for example: textBoxCell1).
  2. Select the desired background pattern from the drop-down list of the textBoxCell1.Style.PatternStyle property in the Properties window.
  3. Select the desired background pattern color from the drop-down window of the textBoxCell1.Style.PatternColor property in the Properties window.

Using Code

This example sets the pattern color and style.

[VB]

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

[CS]

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;
See Also

 

 


Copyright © GrapeCity, inc. All rights reserved.

Support Options