Striplines Opacity

3 posts, 0 answers
  1. Courouble Damien
    Courouble Damien avatar
    54 posts
    Member since:
    Aug 2009

    Posted 05 Jan 2011 Link to this post

    Hi guys 

    I'm trying to apply custom style on striplines via codebehind
    That's working pretty much fine for BackgroundColor, Border Color, Border Thickness but i'm can't have opacity working

    Here's my code ..
      Dim tAxisYStripLineStyle As New Style(GetType(Rectangle))
            tAxisYStripLineStyle.Setters.Add(New Setter(Rectangle.FillProperty, pAxisYStripLines.StripBackgroundColor))
            tAxisYStripLineStyle.Setters.Add(New Setter(Rectangle.StrokeThicknessProperty, pAxisYStripLines.StripThickness))
            tAxisYStripLineStyle.Setters.Add(New Setter(Rectangle.StrokeProperty, pAxisYStripLines.StripBorderColor))
            ' Opacity does work, i've tried to convert to string .. same thing
            tAxisYStripLineStyle.Setters.Add(New Setter(Rectangle.OpacityProperty, 0.3))
     
    ' Apply style to chart
      _Chart.DefaultView.ChartArea.AxisY.AxisStyles.StripLineStyle = tAxisYStripLineStyle

    Is this a bug ? I'm doing something wrong ? 

    Thanks in advance,

    Damien
  2. Sia
    Admin
    Sia avatar
    766 posts

    Posted 06 Jan 2011 Link to this post

    Hello Courouble Damien,

    The observed issue is related to some RadChart specifics. If you want to set for example red color (#FFFF0000) as background for your striplines, you have to play with the alpha of the colors but not with the opacity. The following style will make your striplines 50% transparent:

    <Style x:Key="CustomStrip" TargetType="Rectangle">
        <Setter Property="Fill" Value="#7FFF0000" />
    </Style>

    I hope this helps.

    Kind regards,
    Sia
    the Telerik team
    Browse the videos here>> to help you get started with RadControls for Silverlight
  3. Courouble Damien
    Courouble Damien avatar
    54 posts
    Member since:
    Aug 2009

    Posted 06 Jan 2011 Link to this post

    Oh !
    That's a good news sorry  for having disturbing you, i didn't have think about this solution,

    Again thank you for your great support !

    Damien
Back to Top