BoldSignA modern eSignature application with affordable pricing. Sign up today for unlimited document usage!
Hello there!
Im using this version for WinForms Application with C# : 20.3.0.56
Have a problem with zooming in diagram and view
I need that user Could not do any action out of the diagram Range
like photo attached I wanted diagram and the workspace to be In Blue Lined Range NOT like The red one
maybe disable zooming or Scale !!!I do not Know How reach this purpose!!
Best Regards
Mohammad
Hi Mohammad,
We are working on your requirement. We will update the details on or before December 12, 2022.
Hi Mohammad,
Requirement: How to fill diagram to the window
You can set the document size of the diagram as window size using Resize event of Form.
Code snippet:
private void Form1_Resize(object sender, EventArgs e) { diagram1.Model.DocumentSize = new Syncfusion.Windows.Forms.Diagram.PageSize(this.Width - 10, this.Height - 10); diagram1.Width = this.Width; diagram1.Height = this.Height; } |
We have created a simple sample for your reference as below,
https://www.syncfusion.com/downloads/support/directtrac/general/ze/DiagramFillToWindow240400761
Regards,
Deepa Thiruppathy
Note: If this post is helpful, please consider Accepting it as the solution so that other members can locate it more quickly.
thank for reply
Actually I dont need to fill diagram to the window!!!
I need to Diagram.Model fill the Diagram without Possibility Zooming or scale changings
I need this to be Fixed in Diagram
like image attached : Diagram.Model should fixed in gray environment
(Note : I have multiple Diagrams in my form under each Other that each diagram have Its Own Model)
thanks !
Hi Mohammad,
Requirement: How to fill diagram to its view area
We have modified the sample with multiple diagram page, and we have updated the diagram model size as document size in the form loaded event.
Code snippet:
//Setting diagram model size as diagram window size private void Form_loaded(object sender, EventArgs e) { diagram1.Model.DocumentSize = new PageSize(diagram1.Size.Width, diagram1.Size.Height); diagram1.Width = diagram1.Size.Width; diagram1.Height = diagram1.Size.Height;
diagram2.Model.DocumentSize = new PageSize(diagram2.Size.Width, diagram2.Size.Height); diagram2.Width = diagram2.Size.Width; diagram2.Height = diagram2.Size.Height;
diagram3.Model.DocumentSize = new PageSize(diagram3.Size.Width, diagram3.Size.Height); diagram3.Width = diagram3.Size.Width; diagram3.Height = diagram3.Size.Height; } |
Sample link: https://www.syncfusion.com/downloads/support/directtrac/general/ze/DiagramFillToWindowModified-1790547431
If we misunderstood your requirement, then please share any video representation of your requirement.
Hi Deepa
thanks a lot
your code somehow worked BUT still there are some issues :
1- I want to load my Custom diagram Built with Diagram Builder - when I load it your code did not Work !!!!!
(section 2 in picture)
2- In section 1 in picture your code works fine but I need to user could Not Be able to change with Zoom or Pan
how can I achieve this !!!
thank a lot again.
Hi Mohammad,
We need some more clear details from your side for all your queries,
Query |
Response |
1- I want to load my
Custom diagram Built with Diagram Builder - when I load it your code did
not Work !!!!! |
We understood that you are trying to save a diagram from simple application and loading it later in the diagram builder application. If so, can you share your saved diagram to us. If we misunderstood your query, then please explain your issue clearly. |
2- In section 1 in
picture your code works fine but I need to user could
Not Be able to change with Zoom or Pan |
We are not getting you statement. Do you want to disable the zoom and pan operation on the page, or do you want to maintain the same page and document size when doing zoom and pan? please explain your requirement clearly. |
Hi Deepa
1- first I made A CustomDiagram.edd File using DiagramBuilder.exe
then Im gonna Load my CustomDiagram.edd in My Windows Form Application
using ==> diagram.LoadBinary(FilePath)
then using your code to set size of diagram's Document BUT It did not Work
(*I Attach my CustomDiagram.edd file)
2 - I want to disable Zoom And Pan operations totally that user of my form will not be able to zoom and pan the page!!!
Hi Mohammad,
Please find below response table for all your queries,
Query |
Response |
|
1- first I made A CustomDiagram.edd File using DiagramBuilder.exe then Im gonna Load my CustomDiagram.edd in My Windows Form Application using ==> diagram.LoadBinary(FilePath) then using your code to set size of diagram's Document BUT It did not Work (*I Attach my CustomDiagram.edd file)
|
Reported issue: How to fill diagram to the window after loading new file
To fix this issue, we suggest using below code to fill the diagram to the window after loading new diagram file. Code snippet:
|
|
2 - I want to disable Zoom And Pan operations totally that user of my form will not be able to zoom and pan the page!!! |
You can disable the Pan and Zoom tool action by using ToolActivated event. Once Zoom and Pan tool is activated, we have reset the tool to SelectTool.
Code snippet:
|
Sample link: https://www.syncfusion.com/downloads/support/directtrac/general/ze/DiagramFillToWindowModified-2141604918
Regards,
Deepa Thiruppathy
Hi Deepa Im very Thankful
this will do The job
but I Have another Question !!
Is There Any way That I can Prevent Zooming my page using (Ctrl+MouseScroll)
I do not want it to zoom in or out by pressing Ctrl button and scroll Mouse !!
Hi Mohammad,
Reported issue: How to prevent zoom when using Ctrl+MouseScroll
We suggest you set ZoomIncrement as 0 to prevent zooming from Ctrl+MouseScroll action.
Code snippet:
this.diagram1.View.ZoomIncrement = 0; |