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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Insert Image bug?

Thread ID:





39285 Jan 3,2006 05:46 PM UTC Jan 4,2006 07:37 PM UTC WinForms 1
Tags: Diagram
Chris C
Asked On January 3, 2006 05:46 PM UTC

I ran across a bug while trying to insert an image in a diagram. Prior to inserting an image, I had copied another image to the clipboard. When I tried to insert an image to the diagram, it inserted the image in the clipboard and not the image I selected for insertion. Our application uses the Insert Image toolbar button similar to that used in the DiagramBuilder sample. You can reproduce this behavior using the DiagramBuilder sample. Open an image file (I happened to use Microsoft Paint) and copy it to the clipboard. Next, use the Insert Image toolbar item and select a different image file to insert. You will see that the image that was copied to the clipboard is inserted into the diagram. Do you have any work-arounds for this problem? Thanks in advance for your help. Chris

Administrator [Syncfusion]
Replied On January 4, 2006 07:37 PM UTC

Hi Chris, Thank you for bringing this problem to our attention. A fix has been added, and the next update of Essential Diagram will include a revised version of the BitmapTool class that inserts the correct image. For now, you can workaround the issue by examining the clipboard before calling the Diagram.InsertImage() method, and if the clipboard is found to contain a Bitmap object then replacing it with a non-Image object. The following code should give you an idea, private void barItemImage_Click(object sender, System.EventArgs e) { IDataObject dataObj = Clipboard.GetDataObject(); if(dataObj != null && dataObj.GetDataPresent(typeof(System.Drawing.Bitmap))) Clipboard.SetDataObject("Dummy Value"); this.diagramComponent.InsertImage(); } Hope this helps. Regards, Prakash Surendra Syncfusion Inc.,


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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