The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
At some point I have to prevent any manipulations with Line connectors in Diagram control (switching from design to runtime mode for example). I use Allow/IsXXX properties and PreviewXXX events for nodes but I cannot see how to do it for connectors. I used something like:
MAMaria Amal Raj T Syncfusion Team February 11, 2011 12:25 PM UTC
Hi Arthur,
Thanks for your interest on Syncfusion Products.
When the DiagramView's IsPageEditable property is set to false Editing options will be disables, and operations link selecting and dragging the Nodes and LineConnector is not possible. To prevent only line related operations, please set IsHitTestVisible property to false. This will hide the LineConnector to receive any mouse related operations.
2. To Disable LineConnectors without affecting Node:
//set to IsPageEditable to true. DiagramView diagarmView=new DiagramView(); diagramView.IsPageEditable=true;
//set to LineConnector's IsHitTestVisible to false. LineConnector connector = new LineConnector(); connector.IsHitTestVisible = false;
From the second method Node Select and double click event also fire without any changes in the LineConnectors.
Please let me know if you have any further queries.
Regards, Maria Amal Raj T. (Diagram WPF and Silverlight Team)
MFMary FontanaMarch 22, 2011 06:30 PM UTC
A related question.
How do you disable moving of line connectors, but still allow the connector show a tool tip?
If I do line.IsHitTestVisible = false; The tooltip is also disabled.
MAMaria Amal Raj T Syncfusion Team March 23, 2011 09:15 AM UTC
Hi Mary,
By setting IsHitTestVisibility to false will hide the line from the mouse related operations. So, tool tip will not appear. Currently, disabling LineConnector from dragging is not supported. However, as a workaround, the Decorator shares and the Vertex can be hidden, which in turn disables Line from getting dragged as shown in the following code snippet.
Code Snippet :
LineConnector line = new LineConnector(); //Hide the Vertex line.IsVertexVisible = false; //Hide the Decorator shares line.DecoratorAdornerStyle = this.Resources["HidenThumb"] as Style; //Disable label editing line.IsLabelEditable = false; line.ToolTip = "NewToolTip";
Regards, Maria Amal Raj T, Diagram WPF & Silverlight Team, [Syncfusion].