This question is locked. New answers and comments are not allowed.
I am trying to restyle the bubbles in a Bubble series so they look a little more 3-d. I have accomplished this with a radial gradiant in this style here:
My problem is that in every example I have seen you have to set the colors at design time. In out scenario I have built a control that extends the RadChart. I have a dependency property which is a list of brushes. If that is set then I use those colors. If not then I use your default colors. I was thinking I could catch the item when the color is set and then change it to add a gradiant so it is the same color just with the gradient added but I can't seem to figure out if that is possible. Something like setting the fill property to Bind to something in Bubble and then using a converter to add the gradient. Is anything like this possible or do I just need to come up with new default colors on my own and do it that way? Sorry if this does not make sense as I was having trouble figuring out how to explain it. Thanks.
<
Style
x:Key
=
"CustomBubbleStyle"
TargetType
=
"chart:Bubble"
>
<
Setter
Property
=
"Template"
>
<
Setter.Value
>
<
ControlTemplate
TargetType
=
"chart:Bubble"
>
<
Canvas
>
<
Ellipse
x:Name
=
"PART_BubbleElement"
Canvas.Left
=
"{TemplateBinding Left}"
Canvas.Top
=
"{TemplateBinding Top}"
Width
=
"{TemplateBinding Diameter}"
Height
=
"{TemplateBinding Diameter}"
>
<
Ellipse.Fill
>
<
RadialGradientBrush
>
<
GradientStop
Color
=
"#FFF5F5F9"
/>
<
GradientStop
Color
=
"#FF091E8F"
Offset
=
"0.989"
/>
</
RadialGradientBrush
>
</
Ellipse.Fill
>
</
Ellipse
>
</
Canvas
>
</
ControlTemplate
>
</
Setter.Value
>
</
Setter
>
</
Style
>
My problem is that in every example I have seen you have to set the colors at design time. In out scenario I have built a control that extends the RadChart. I have a dependency property which is a list of brushes. If that is set then I use those colors. If not then I use your default colors. I was thinking I could catch the item when the color is set and then change it to add a gradiant so it is the same color just with the gradient added but I can't seem to figure out if that is possible. Something like setting the fill property to Bind to something in Bubble and then using a converter to add the gradient. Is anything like this possible or do I just need to come up with new default colors on my own and do it that way? Sorry if this does not make sense as I was having trouble figuring out how to explain it. Thanks.