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

Double click on Diagram objects displays objects types

4 Answers 215 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
Sylvain
Top achievements
Rank 1
Sylvain asked on 03 Nov 2015, 01:44 PM

Hello Telerik

 

A double click on any node, edge, or text content of my Diagram display the underlying object type (c.f. attached image)

I succeeded to prevent this for the nodes, adding the following property to the Diagram in XAML:

ShapeDoubleClicked="diagram_ShapeDoubleClicked"

And in code-behind:

private void diagram_ShapeDoubleClicked(object sender, Telerik.Windows.Controls.Diagrams.ShapeRoutedEventArgs e)
      {
         e.Handled = true;
      }

However I would like to disable this behavior for anything on the Diagram.

I did try the same idea with the MouseDoubleClick event, but it didn't change anything: edges and texts still displays object types...

Is there a solution to this?

Thanks for your help,

Sylvain

4 Answers, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 05 Nov 2015, 11:04 AM
Hi Sylvain,

Double click on a diagram item enters its edit mode. In an MVVM scenario in order to have a meaningful content in edit mode you will need to define a ShapeEditTemplate and ConnectionEditTemplate. If such template is not defined the edit mode will display the result returned by the ToString() method of the shape/connection's view model.

To disable the editing feature of RadDiagram you can set its IsEditable property to False.
<telerik:RadDiagram IsEditable="False">

Regards,
Martin
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Sylvain
Top achievements
Rank 1
answered on 06 Nov 2015, 02:37 PM

That was so simple!

I haven't read anywhere in the RadDiagram documentation about the edit mode activated via double click; did I misread?

Anyhow, thank you Martin!

0
Martin Ivanov
Telerik team
answered on 06 Nov 2015, 03:20 PM
Hello Sylvain,

The diagram's edit mode is described in the Items Editing help article.

Regards,
Martin
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Sylvain
Top achievements
Rank 1
answered on 06 Nov 2015, 04:08 PM

Indeed, on the page's very first line.

Thanks for pointing it out!

Cheers,

Sylvain

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