connector tool behaviour

2 posts, 0 answers
  1. Revathi
    Revathi avatar
    1 posts
    Member since:
    May 2013

    Posted 17 Jun 2013 Link to this post


    I am exploring RadDiagram for silver light (using trial version now). Using raddiagram demo site ( I draw  process step 1, step 2 and step 3 (rectangle) shapes and connect them using straight line connector. Now I draw process step 4 shape straight down to step 1 and connect step 3 and step 4. The line comes diagonal. If I select connector style type as "poly line",  I am not getting a poly line connector. I have to select connector style type bezier and then switch back to poly line to get poly line behaviour on the drawing pane. My questions are
    1) why direct selection of polyline style doesnot reflect polyline behaviour on the drawing pane?
    2) I expect poly line to be displayed using straight lines as in the expected_behavior.jpg, but poly line displayed as shown in current_behavior.jpg. please tell me how to get the expected behavior?
    3) if I select connector tool from the tools box, even after drawing the connector line, it keeps on drawing the connector lines whenever i click on the drawing pane till I select pointer tool. Is there any way to stop the connector lines from drawing after drawing the first connector line?

    Immediate response would help me a lot
  2. Zarko
    Zarko avatar
    755 posts

    Posted 18 Jun 2013 Link to this post

    Hi Revathi,
    I'll try to answer all of you questions here:
    1) By default the connections' type is Polyline, but they have just two points - Start and End. When you select Bezier type we automatically add two more points and that's why you see them when you go back to Polyline type. You could manually add connection points to a polyline connection by clicking on it while holding Ctrl key.
    2) You'll either have to manually do this or use routing to get this type of display - could you please take a look at this article and try out the InflatedRectRouter routing (note: we're still working on the routing and we'll try to fix its issues for our next Q)
    3) You could handle the ConnectiomManipulationCompleted event and change the tool there:
    private void OnConnectionManipulationCompleted(object sender, Telerik.Windows.Controls.Diagrams.ManipulationRoutedEventArgs e)
        if (this.diagram.ActiveTool == MouseTool.ConnectorTool)
            this.diagram.ActiveTool = MouseTool.PointerTool;
    or the ItemsChanged event:
    private void OnDiagramItemsChanged(object sender, Telerik.Windows.Controls.Diagrams.DiagramItemsChangedEventArgs e)
        if (e.Action == System.Collections.Specialized.NotifyCollectionChangedAction.Add)
            if (e.NewItems.Count() > 0 && this.diagram.ContainerGenerator.ContainerFromItem(e.NewItems.ElementAt(0)) is IConnection)
                this.diagram.ActiveTool = MouseTool.PointerTool;
    I hope I was able to help you and if you have further questions please feel free to ask.


    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top