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

raddiagram shape detection error

3 Answers 39 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
al
Top achievements
Rank 1
al asked on 22 Aug 2016, 09:35 AM

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).

3 Answers, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 22 Aug 2016, 01:23 PM
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.
0
al
Top achievements
Rank 1
answered on 22 Aug 2016, 01:39 PM

thank you Martin,

it works very fine.

thank you again.

0
al
Top achievements
Rank 1
answered on 22 Aug 2016, 01:39 PM

thank you Martin,

it works very fine.

thank you again.

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