We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Croping Diagram

Thread ID:

Created:

Updated:

Platform:

Replies:

82077 May 31,2009 05:27 PM Jun 5,2009 07:54 AM Windows Forms 3
loading
Tags: Diagram
Administrator [Syncfusion]
Asked On May 31, 2009 05:27 PM

Hello,

I need to insert an image of my diagram into an Excel spreadsheet. To have the greatest image size possible, I would like to crop the diagram to include only the area containing nodes and not the entire document size. Is there a simple way to do this?

Thanks

Gowri Manohari D [Syncfusion]
Replied On June 1, 2009 05:27 AM

Hi SteveM,

Thanks for choosing Syncfusion Products.

Syncfusion Diagram has property called SizeToContent. It is boolean value if it is set to true means,diagram will remove the all unwanted spaces in the document and crop the image area. The below is the code snippet.

diagram1.Model.SizeToContent = true;

Let me know this will reach your requirement

Thanks & Regards,
Gowri




Steven Mohnkern
Replied On June 3, 2009 09:32 AM

Yes. That is what I am currently using. I was just wondering if you had a way to have a bigger document in the diagram viewer which could be cropped just when printing or saving to an image.

Thanks

Gowri Manohari D [Syncfusion]
Replied On June 5, 2009 07:54 AM

Hi SteveM,

I have created sample for your requirement.There is no direct method for save/print the Crop Diagram.We can save the crop diagram using some other logic or methods.

The functionality of the sample is to Save the selected nodes in the diagram.Before click the save button in the sample you should select what part of diagram wants to Save.Load button loads the diagram which you saved before.


Please download the sample from the below link.

http://files.syncfusion.com/support/Diagram.Windows/Forums/F82077/main.htm

Let me know whether the above sample meets your requirement.


Regards,
Gowri

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;