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

Border on arrows of RadDiagramConnection

2 Answers 44 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
Tatiana
Top achievements
Rank 1
Tatiana asked on 24 Oct 2018, 06:27 PM

Hello!

 

I'm using RadDiagramConnection to draw Line with Arrows. When I set StrokeDashArray to some array, for example "5 1" to draw dashed line, I get this dashed line on the border of my arrows.

So would you be so kind to tell me how I can remove these borders from my arrows please?

This is my code:

<telerik:RadDiagramConnection StartPoint="410,100" EndPoint="100,420"
                                                                  SourceCapType="Arrow1Filled" TargetCapType="Arrow1Filled"
                                                                  SourceCapSize="40,40" TargetCapSize="40, 40" StrokeDashArray="5 1"
                                                                  StrokeThickness="5" Background="White" BorderBrush="Transparent"
                                                                  Stroke="Red"
                                                                  />

Best regards,
Tatiana

2 Answers, 1 is accepted

Sort by
0
Accepted
Martin Ivanov
Telerik team
answered on 26 Oct 2018, 09:04 AM
Hello Tatiana,

The line and the arrow cap of the connection are part of a single Geometry that is rendered via the native Path control. This means that the StrokeDashArray will be applied on the geometry and therefore on the arrow cap. I am afraid that this cannot be altered using the RadDiagram's API. 

However, there is a possible solution that you can use. Basically, you can create a custom RadDiagramConnection control and override its template. There you can include two additional Path controls for the arrow cap. Then you can draw them manually and customize their appearance as you like. I prepared a sample project showing this approach. Can you please check it out and let me know if it helps?

Regards,
Martin Ivanov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Tatiana
Top achievements
Rank 1
answered on 29 Oct 2018, 11:27 AM

Hello Martin,

Thank you very much for your help, it worked for my case perfectly!

Best regards,
Tatiana

Tags
Diagram
Asked by
Tatiana
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
Tatiana
Top achievements
Rank 1
Share this question
or