This is a migrated thread and some comments may be shown as answers.

Striplines Opacity

2 Answers 47 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Courouble Damien
Top achievements
Rank 1
Courouble Damien asked on 05 Jan 2011, 12:50 PM
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 Answers, 1 is accepted

Sort by
0
Sia
Telerik team
answered on 06 Jan 2011, 12:31 PM
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
0
Courouble Damien
Top achievements
Rank 1
answered on 06 Jan 2011, 04:51 PM
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
Tags
Chart
Asked by
Courouble Damien
Top achievements
Rank 1
Answers by
Sia
Telerik team
Courouble Damien
Top achievements
Rank 1
Share this question
or