GrapeCity MultiRow Windows Forms Documentation
PatternColor Property (Section)
Example 


Gets or sets a System.Drawing.Color that indicates what color pattern is drawn on the Section.
Syntax
<FeatureAttribute(Name="Section", Version="V5.0")>
<SRDescriptionAttribute("Indicates the pattern color of the Section.")>
<DefaultValueAttribute()>
<SRCategoryAttribute("Appearance")>
Public Property PatternColor As Color
Dim instance As Section
Dim value As Color
 
instance.PatternColor = value
 
value = instance.PatternColor
[Feature(Name="Section", Version="V5.0")]
[SRDescription("Indicates the pattern color of the Section.")]
[DefaultValue()]
[SRCategory("Appearance")]
public Color PatternColor {get; set;}

Property Value

A System.Drawing.Color value that represents what color pattern is drawn on the Cell. The default is Color.Empty.
Example
The following code example shows how to use PatternColor and PatternStyle to create a patten effect. This code example is part of a larger example provided for the Section class.
void setPattenButton_Click(object sender, EventArgs e)
        {
            Template template = Template.Default;

            Section section = template.Row;

            // The PatternColor, PatternStyle should be use together
            section.PatternColor = Color.Red;
            section.PatternStyle = MultiRowHatchStyle.BackwardDiagonal;

            // Reload template.
            this.gcMultiRow1.Template = template;
        }
Private Sub setPattenButton_Click(ByVal sender As Object, ByVal e As EventArgs) Handles setPattenButton.Click
        Dim template1 As Template = Template.Default

        Dim section As Section = template1.Row

        ' The PatternColor, PatternStyle should be use together
        section.PatternColor = Color.Red
        section.PatternStyle = MultiRowHatchStyle.BackwardDiagonal

        ' Reload template.
        Me.gcMultiRow1.Template = template1
    End Sub
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

Section Class
Section Members
PatternStyle Property

 

 


Copyright © GrapeCity, inc. All rights reserved.