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. Image for the cookie policy date

Using image/icon instead of using a graphical design symbol.

How can I define and insert a symbol that displays an image instead of a rectangle, circle or such ? Thanks

8 Replies

AD Administrator Syncfusion Team August 26, 2004 06:52 AM

Hi Rui Take a look at the DiagramBuilder sample where you can insert an image as a node. Essential Diagram includes support for MetafileNode and BitmapNode. Here is a sample demonstrating the the use of Custom Tools in a Essential Diagram Application. This sample demonstrates a custom Rectange Tool which inserts a rectangle with an image as the background or as a seperate node. Regards, Arun


AD Administrator Syncfusion Team August 26, 2004 10:06 AM

But when i insert a symbol instance of my class MySymbol in the diagram I just have to call this.insSymbolTool.Symbol = mysymbInst; this.diagram.Controller.ActivateTool(this.insSymbolTool); ...how can I make this with a BitmapNode ?? thank you >Hi Rui > >Take a look at the DiagramBuilder sample where you can insert an image as a node. Essential Diagram includes support for MetafileNode and BitmapNode. >Here is a sample demonstrating the the use of Custom Tools in a Essential Diagram Application. This sample demonstrates a custom Rectange Tool which inserts a rectangle with an image as the background or as a seperate node. > >Regards, >Arun


AD Administrator Syncfusion Team August 26, 2004 01:18 PM

Hi Rui, The DiagramBuilder sample shows how you can insert an Image node using the InsertImage method which activates either the BitmapTool or the MetafileTool, on the type of image passed in. Here is a samplein which you can drag and drop the image from the picturebox onto the diagram. The underlying code in the Diagram''s DragDrop event shows how a BitmapNode is added. The sample also demonstrates adding a node using the InsertImage() image method and pressing on the GetSelectedNode type button after selecting a node shows a MessageBox with the type of node that is currently selected. Regards, Arun


AD Administrator Syncfusion Team September 2, 2004 06:01 PM

Hello Arun, I have VB.NET and cannot work out how to translate this sample. Your assistance would be appreciated. Thank you, William >Hi Rui, > >The DiagramBuilder sample shows how you can insert an Image node using the InsertImage method which activates either the BitmapTool or the MetafileTool, on the type of image passed in. >Here is a samplein which you can drag and drop the image from the picturebox onto the diagram. The underlying code in the Diagram''s DragDrop event shows how a BitmapNode is added. > >The sample also demonstrates adding a node using the InsertImage() image method and pressing on the GetSelectedNode type button after selecting a node shows a MessageBox with the type of node that is currently selected. > >Regards, >Arun


AD Administrator Syncfusion Team September 3, 2004 09:01 AM

Hi William Here is the VB.NET version of the sample. Thanks Arun


AD Administrator Syncfusion Team September 3, 2004 10:39 AM

Arun, Thank you very much. Regards, William


ES Eric Silver October 26, 2004 02:48 PM

Ok here is something a little bit more complex. Can you add ports to this image. From what I can see there is no Ports collections to the custom rectangle object. >But when i insert a symbol instance of my class MySymbol in the diagram I just have to call >this.insSymbolTool.Symbol = mysymbInst; >this.diagram.Controller.ActivateTool(this.insSymbolTool); > >...how can I make this with a BitmapNode ?? >thank you > >>Hi Rui >> >>Take a look at the DiagramBuilder sample where you can insert an image as a node. Essential Diagram includes support for MetafileNode and BitmapNode. >>Here is a sample demonstrating the the use of Custom Tools in a Essential Diagram Application. This sample demonstrates a custom Rectange Tool which inserts a rectangle with an image as the background or as a seperate node. >> >>Regards, >>Arun


AD Administrator Syncfusion Team October 26, 2004 04:17 PM

Hi Eric I have replied to this post with a sample. Regards Arun

Loader.
Live Chat Icon For mobile
Up arrow icon