Handling click of connector

3 posts, 1 answers
  1. Roy
    Roy avatar
    9 posts
    Member since:
    Dec 2014

    Posted 17 Oct Link to this post

    I would like to handle a double click event on a connector. For shapes there is a OnShapeDoubleClicked, but I can't seem to find a way of handling the double click of an connector.

    I tried handling the double-click event of the diagram itself, but can't seem to find the connector at the click location.

    Is there an easy way to achieve this?

  2. Answer
    Dinko
    Admin
    Dinko avatar
    206 posts

    Posted 18 Oct Link to this post

    Hello Roy,

    You can subscribe to the MouseDoubleClick event of the RadDiagramConnector using EventManager.RegisterClassHandler() method. Check the code snippet below.
    public MainWindow()
    {
        InitializeComponent();
        EventManager.RegisterClassHandler(typeof(RadDiagramConnector), MouseDoubleClickEvent, new RoutedEventHandler(MouseDoubleClick));
    }
     
    private static void MouseDoubleClick(object sender, RoutedEventArgs e)
    {
      //your code here
    }

    Hope this information is helpful.

    Regards,
    Dinko
    Telerik by Progress
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
  3. UI for WPF is Visual Studio 2017 Ready
  4. Roy
    Roy avatar
    9 posts
    Member since:
    Dec 2014

    Posted 24 Oct Link to this post

    Thanks, usings your solution I managed to create a working solution to my problem
Back to Top