I want to make the connectors gradient colored, from source to target. I can't figure out how to do it by setting Stroke style with GradientBrush. Can you help me?
here is what i tried(i know it works for left to right only):
5 Answers, 1 is accepted
Do you tried to apply that through style? And how do you apply it? I tried to set the Connection's Stroke as follows and it works as expected.
It also works for me if I set the Stroke in style setter and then apply that style using the RadDiagram ConnectionStyle Property.
Hope this helps. All the best,
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.
The main issue is that style applied only if the link is left to right. But other connections like up-down, down-up, right-left does not work. They works but not source to target, only left to right.
The Start and Endpoint 0,0 1,0 is :
source_________________________target this works because it's in right direction.
target___________________________source this does not work because style start/end point is 0,0 - 1,0 and the gradient will be target-source direction.
I am using that style:
Hope you can understand that issue.
The "Grad" is simply a way to allow changing the colors in XAML but you could define a set of custom properties as well of course.To use this custom connection simply use something like:
Hope this helps, Fr.