New to Telerik UI for WPF? Download free 30-day trial

Styling the Strip Lines

The strip lines are part of the axes items and are represented by the StripLine and AlternateStripLine controls. There are two types of strip lines - Horizontal and Vertical. Each of them contains alternating Lines - one with Gray color by default (called AlternateStripLine) and the other is Transparent (called just StripLine).

To be able to modify the colors of these lines you should use the following Styles:

<Style x:Key="HorizontalAlternateStripLineStyle" TargetType="Rectangle"> 
    <Setter Property="Fill"> 
        <Setter.Value> 
            <LinearGradientBrush SpreadMethod="Pad" StartPoint="0,1" EndPoint="1,0"> 
                <GradientStop Offset="0" Color="Black" /> 
                <GradientStop Offset="1" Color="#FF00B4FF" /> 
            </LinearGradientBrush> 
        </Setter.Value> 
    </Setter> 
</Style> 

<Style x:Key="HorizontalStripLineStyle" TargetType="Rectangle"> 
    <Setter Property="Fill" Value="LightGray" /> 
</Style> 

Set the created Styles to the AxisY.AxisStyles (for modifying the color of the Horizontal striplines) or AxisX.AxisStyles (for Vertical striplines) property of your RadChart like this:

RadChart1.DefaultView.ChartArea.AxisY.AxisStyles.AlternateStripLineStyle = this.Resources["HorizontalAlternateStripLineStyle"] as Style; 
RadChart1.DefaultView.ChartArea.AxisY.AxisStyles.StripLineStyle = this.Resources["HorizontalStripLineStyle"] as Style; 
RadChart1.DefaultView.ChartArea.AxisY.AxisStyles.AlternateStripLineStyle = TryCast(Me.Resources("HorizontalAlternateStripLineStyle"), Style) 
RadChart1.DefaultView.ChartArea.AxisY.AxisStyles.StripLineStyle = TryCast(Me.Resources("HorizontalStripLineStyle"), Style) 

You should turn StripLines visibility on so that you will be able to see them.

RadChart1.DefaultView.ChartArea.AxisY.StripLinesVisibility = System.Windows.Visibility.Visible; 
RadChart1.DefaultView.ChartArea.AxisY.StripLinesVisibility = System.Windows.Visibility.Visible 

Here is a snapshot of the result: WPF RadChart

In this article