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.
Syncfusion Feedback

InsertImage into Diagram

Thread ID:

Created:

Updated:

Platform:

Replies:

16843 Jul 26,2004 09:48 AM UTC Jul 26,2004 11:12 AM UTC Windows Forms 1
loading
Tags: Diagram
Nisha
Asked On July 26, 2004 09:48 AM UTC

Hi, I am trying to use and evaluate the Diagram tool. I need to Insert an Image when I show the Diagram on the Form. There are 2 problems that I am facing. 1. I have the following code. private void ShowImage(Image image) { System.IO.Stream str = new MemoryStream(); image.Save(str, ImageFormat.Jpeg); Tool tool = diagram1.Controller.GetTool("ImageTool"); diagram1.Controller.ActivateTool(tool); this.diagram1.InsertImage(str); } Unless and untill the user clicks on the Diagram the image is not inserted. I need to automatically show the image. something like this RoundRect r = new RoundRect(100,100,100,100); diagram1.Model.AppendChild(r); Is there anything equivalent to this for Images? 2.Irrespective of the current zoom in the diagram, I want the image to be inserted as if the zoom is 100% Can anyone help me out with this? Thanks in Advance. Nisha

Nisha
Replied On July 26, 2004 11:12 AM UTC

Oooops... I got it :) BitmapNode was my answer. >Hi, >I am trying to use and evaluate the Diagram tool. >I need to Insert an Image when I show the Diagram on the Form. >There are 2 problems that I am facing. >1. I have the following code. >private void ShowImage(Image image) >{ > System.IO.Stream str = new MemoryStream(); > image.Save(str, ImageFormat.Jpeg); > Tool tool = diagram1.Controller.GetTool("ImageTool"); > diagram1.Controller.ActivateTool(tool); > this.diagram1.InsertImage(str); >} >Unless and untill the user clicks on the Diagram the image is not inserted. >I need to automatically show the image. >something like this > RoundRect r = new RoundRect(100,100,100,100); > diagram1.Model.AppendChild(r); >Is there anything equivalent to this for Images? > >2.Irrespective of the current zoom in the diagram, I want the image to be inserted as if the zoom is 100% > >Can anyone help me out with this? > >Thanks in Advance. > >Nisha >

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

;