Looking through the code of the 2012 Q2 release it appears if I can register my own IRoutingService I would be able to control the lines drawn for my connections.
First is that true statement? And if so is there a sample on how to do that?
After further investigation I decided to derive my own class from RadDiagram. I then overrode the OnInitialized method and inside set the IRouter property of the RoutingService to my custom Router.
Seems to be doing the trick, however, if there is a better implementation please let me know.
Donovan
0
Petar Mladenov
Telerik team
answered on 12 Jun 2012, 01:40 PM
Hi Donovan,
Thank you for your interest in this feature. it will be documented till the end of this week.
However, there is no need to inherit the whole diagram. You can create your custom Router by implementing the IRouter Interface:
public class MyCustomRouter : IRouter
{
public System.Collections.Generic.IList<Point> GetRoutePoints(IConnection connection, bool showLastLine)
{
return new List<Point>(){new Point(0,100), new Point(100, 200)};
}
}
public MainPage()
{
InitializeComponent();
this.diagram.RoutingService.Router = new MyCustomRouter();
}
Please let us know if this is suitable for you.
All the best,
Petar Mladenov
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>