How to disable label editing

4 Jan 20181 minute to read

How to disable label editing for node

The label editor for the particular node can be disabled by assigning the label’s ReadOnly property to true.

The following code example illustrates on how to disable the label editor for particular node.

Syncfusion.Windows.Forms.Diagram.Rectangle process = new Syncfusion.Windows.Forms.Diagram.Rectangle(50, 325, 100, 70);

//To disable label editing

process.Labels.Add(new Syncfusion.Windows.Forms.Diagram.Label() { ReadOnly = true, Text="process2" });
Dim process As New Syncfusion.Windows.Forms.Diagram.Rectangle(50, 325, 100, 70)

'To disable label editing for node

process.Labels.Add(New Syncfusion.Windows.Forms.Diagram.Label() With {.ReadOnly = true ,Text="process2"})

How to disable label editing for the whole Diagram

The label editor for the entire Diagram can be disabled by setting the diagram.Controller’s InPlaceEditing to false.

The following code example illustrates on how to disable the label editor for the whole Diagram.

//To disable label editing in entire diagram

diagram1.Controller.InPlaceEditing = false;
'To disable label editing in entire diagram

diagram1.Controller.InPlaceEditing = False