Xceed Chart for WinForms v4.4 Documentation
Xceed.Chart.Standard.v4.4 Assembly / Xceed.Chart.Standard Namespace / FillEffect Class / SetPattern Method
The type of the pattern from the HatchStyle enumeration.
The foreground color of the pattern
The background color of the pattern
Example


In This Topic
    SetPattern Method
    In This Topic
    Use this function to apply a pattern fill effect. Note that this function will also change the current Mapping.
    Syntax
    'Declaration
     
    Public Sub SetPattern( _
       ByVal hatchStyle As HatchStyle, _
       ByVal beginColor As Color, _
       ByVal endColor As Color _
    ) 
    'Usage
     
    Dim instance As FillEffect
    Dim hatchStyle As HatchStyle
    Dim beginColor As Color
    Dim endColor As Color
     
    instance.SetPattern(hatchStyle, beginColor, endColor)
    public void SetPattern( 
       HatchStyle hatchStyle,
       Color beginColor,
       Color endColor
    )

    Parameters

    hatchStyle
    The type of the pattern from the HatchStyle enumeration.
    beginColor
    The foreground color of the pattern
    endColor
    The background color of the pattern
    Remarks
    Use this function if you want to apply a gradient fill effect. The function will change the Type, HatchStyle, BeginColor and EndColor properties of the FillEffectBase. It will also replace the current FillEffectMapping object with a texture mapper with tiled layout type and object linear map mode. For more information see the topics under the "Fill Effects" book in the Users Guide.
    Example
    The following example applies an image to the left chart wall:
    Dim chart As Chart = CType((m_ChartControl.Charts(0)), Chart)
    Dim fillEffect As FillEffectBase =  chart.Wall(ChartWallType.Left).FillEffect 
    fillEffect.SetPattern(HatchStyle.DiagonalBrick, Color.White, Color.Black)
    Chart chart = (Chart)(m_ChartControl.Charts[0]);
    FillEffectBase fillEffect = chart.Wall(ChartWallType.Left).FillEffect;
    fillEffect.SetPattern(HatchStyle.DiagonalBrick, Color.White, Color.Black);
    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