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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Error while saving diagram to memoryStream

Thread ID:

Created:

Updated:

Platform:

Replies:

102230 Jan 11,2012 02:22 PM UTC Jan 12,2012 08:23 AM UTC WPF 1
loading
Tags: Diagram
nadeem
Asked On January 11, 2012 02:22 PM UTC

Hi,
I am using this code to save diagram to memorystream.

DiagramControl dc = new DiagramControl();
System.IO.MemoryStream stream = new System.IO.MemoryStream();
dc.Save(stream as System.IO.Stream);
But i am getting this error
"Object reference not set to an instance of an object."




Ramya Thirugnanam [Syncfusion]
Replied On January 12, 2012 08:23 AM UTC

Hi Nadeem,

With regards to save the diagram to memory stream, this can be achieved by using the Save method of the DiagramControl. We have created a simple sample to represent this. please refer to the sample from the attachment.

Note: While loading from memory stream please make sure the stream’s Position property is set to 0.

For further details about the Export and Import using Streams, please refer to the following online help documentation.

link: http://help.syncfusion.com/ug_94/User%20Interface/WPF/Diagram/index.htm and Navigate to the concepts and features.-> Diagram View-> Export diagram in image format

Please let us know if you have any concerns.
Regards,
Ramya




DiagramviewExport_baf1a268.zip

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.

Warning Icon 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.Close Icon

;