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

Click on background

1 Answer 170 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
Jared
Top achievements
Rank 1
Jared asked on 20 Sep 2018, 03:41 PM

Hi all

I am binding the 'IsSelectedProperty' to trigger actions when a RadDiagramShape is selected (Clicked).

I also need to handle when the Background of the Diagram is clicked.. I've tried the override '(Preview)OnMouseDown' functions, but these also get called when the shape is clicked. I want to distinguish the case where the background of the diagram is clicked only... not a shape. Any ideas what I should be using?

 

Thanks

1 Answer, 1 is accepted

Sort by
0
Dinko | Tech Support Engineer
Telerik team
answered on 24 Sep 2018, 12:17 PM
Hello Jared,

I already answered this question in your support ticket, but I will quote my reply also here so that it can be visible in our community.

The internal logic of the RadDiagram control requires to capture the mouse events. That is when you click on a RadDiagramShape, first the mouse down of the diagram will be called then the event of the shape itself. What you can do is first use the ShapeClicked event of the RadDiagramShape. The event will be fire  To distinguish if a shape is clicked you can get the HitTestService of the RadDiagram and check the ShapeUnderMouse property. I have prepared a sample project which demonstrates this approach. 

Regards,
Dinko
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Diagram
Asked by
Jared
Top achievements
Rank 1
Answers by
Dinko | Tech Support Engineer
Telerik team
Share this question
or