Color of axis labels

2 posts, 0 answers
  1. Marek
    Marek avatar
    2 posts
    Member since:
    Jan 2009

    Posted 29 Mar 2009 Link to this post

    Hello,

    I need to change foreground color of axis value labels. I tried to set style of AxisX(Y)Label2D, but with no effect.

    <

     

    Style TargetType="{x:Type telerik:AxisXLabel2D}">

     

     

     

        <Setter Property="Foreground" Value="Red" />

     

     

     

    </Style>

    Thanks for your reply!

    Marek

     

  2. Ves
    Admin
    Ves avatar
    2926 posts

    Posted 30 Mar 2009 Link to this post

    Hi Marek,

    It seems there is a glitch which prevents this approach from working correctly. I have notified our developers of it and the fix has been scheduled for the service pack release, expected within two weeks. For the time being you can use the following workaround:

    <Grid.Resources> 
                <telerik:LabelFormatConverter x:Key="labelFormatConverter" /> 
                <Style TargetType="telerik:AxisXLabel2D" > 
                    <Setter Property="Foreground" Value="Red" /> 
                    <Setter Property="Template"
                        <Setter.Value> 
                            <ControlTemplate TargetType="telerik:AxisXLabel2D"
                                <TextBlock Text="{Binding Converter={StaticResource labelFormatConverter}}" /> 
                            </ControlTemplate> 
                        </Setter.Value> 
                    </Setter> 
                </Style> 
            </Grid.Resources> 
            <telerik:RadChart x:Name="RadChart1" > 
            </telerik:RadChart> 

    Your Telerik points have been updated.

    Best regards,
    Ves
    the Telerik team

    Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Back to Top