Is it possible, and if so how, to replace the connection line. For example, we would like to have a double line (instead of a single line). We've tried changing the Stroke brush, but we did not have success when the orientation of the connection changed. Thank you in advance.
4 Answers, 1 is accepted
0
Hello Anthony,
There are plenty of other properties to control the visual representation of a Connection - look at the bottom here.
Hope this helps. Greetings,
Miro Miroslavov
the Telerik team
In order to make the connection line more thick you can set the StrokeThickness that way:
<
telerik:RadDiagramConnection
EndPoint
=
"100 100"
StrokeThickness
=
"2"
/>
Hope this helps. Greetings,
Miro Miroslavov
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.
0
Anthony
Top achievements
Rank 1
answered on 06 May 2013, 03:56 PM
I understand how to change the stroke thickness, but that was not my question. We would like to have a double line instead of a single line -- please see attached examples.
0
Accepted
Hello Anthony,
Miro Miroslavov
the Telerik team
Can you can achieve this by creating Custom Connection. This is not very straight forward. You can examine my attached project. Please note that in this particular scenario you should take care of the angle between the line and the shape. Otherwise if the connection is vertical - the two lines will merge into one.
Hope this helps. Please let us know if we can be of further help.
Miro Miroslavov
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.
0
Matt
Top achievements
Rank 1
answered on 17 May 2013, 09:24 AM
For anyone interested, the double lines can be separated without worrying about orientation using the following code:
Cheers
M
var rotation = Math.Atan2(EndPoint.Y - StartPoint.Y, EndPoint.X - StartPoint.X);
rotation += Math.PI / 2;
var vOffset =
new
Point(Math.Cos(rotation) * 2.5, Math.Sin(rotation) * 2.5);
M