raddiagram shape detection error

4 posts, 0 answers
  1. al
    al avatar
    15 posts
    Member since:
    Feb 2016

    Posted 22 Aug Link to this post

    hi dear developers,

    i am using raddiagram in wpf.

    for shapes, i have used custom shapes and a text where both image and text are added to a stackpanel and the stackpabnel is setted to be the shape content.

    now i need to find the item in the diagram by hit test but the hit test brings the textblock or image instead of raddiagram shape. i need the hit test to bring back the raddiagram shape not image or text block. (i also have used IsHittestvisible property to prevent image and text block from catching by the hit test but by using this, the hit test bring nothing).

  2. Martin
    Admin
    Martin avatar
    1101 posts

    Posted 22 Aug Link to this post

    Hi Al,

    You can get the diagram item under the mouse (shape or connection) using the HitTestService of the diagram.
    var hitTestService= diagram.ServiceLocator.GetService<IHitTestService>() as HitTestService;

    Regards,
    Martin
    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. al
    al avatar
    15 posts
    Member since:
    Feb 2016

    Posted 22 Aug Link to this post

    thank you Martin,

    it works very fine.

    thank you again.

  5. al
    al avatar
    15 posts
    Member since:
    Feb 2016

    Posted 22 Aug in reply to Martin Link to this post

    thank you Martin,

    it works very fine.

    thank you again.

Back to Top