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.
Is it possible to programmatically set the Zoom %? For example, I want to give users a slider control to toggle the zoom, or a dropdown box with select values: 50%, 75%, 100%, 200%, 400%, etc.
Also, is it possible to enable Zooming on a grid using ctrl+mouse, but not allow a user to edit the shapes in the diagram? I found that Zooming with the mouse only works if IsPageEditable is set to TRUE.
//Calculate the factor by which to zoomin/out to resize the view to the desired percentage. diagramView.ZoomFactor = Math.Abs(currentfactor - num);
//Calculate whether to zoom in or zoom out depending on the currentfactor value. if (currentfactor > num) { ZoomCommands.ZoomOut.Execute(diagramView.Page, diagramView); } else { ZoomCommands.ZoomIn.Execute(diagramView.Page, diagramView); }
currentfactor = num; }
2)On setting IsPageEditable, the zoom operation itself is disabled . Therefore in order to enable zooming using ctrl+mousewheel, the IsPageEditable property can be set as True.
Now to disable editing of nodes , the AllowSelect property of the node can be set to false. (When node selection is diabled, then node drag, rotation and resizing are automatically disabled as all these operations can be performed only after the node is selected). However connectors will still be selectable and we will provide an equivalent property for connectors in our Volume 4 release of Essential Diagram which is scheduled to be in the month of October 2009.
The AllowSelect property can be set in the following way:
nodeobj.AllowSelect=false;
To set for all the nodes on the page, the following code can be used:
This will set the AllowSelect property of all the nodes on the page to false.
Please let us know if there are any concerns.
Regards, Nikhil
JFJames FosterJanuary 21, 2011 09:59 PM UTC
Has the AllowSelect property been added for LineConnectors?
What I am looking to know is whether, in the latest releases, there is an easy way to:
a) Only allow users to select nodes b) Only allow users to select a single node at a time c) Hook into some sort of node-selecting event when the diagram is databound to a hierarchical data source
Users should not be able to resize nodes, rotate nodes, delete nodes, or delete connectors. Just click on a node to tag it as "selected".
Any new features to support that? IsPageEditable prevents the selection, but there do not seem to be enough properties to shut off all the other editing features other than Selection.