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
close icon

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 10:52 AM UTC

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 02:06 PM UTC

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 05:18 PM UTC

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 10:01 PM UTC

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 01:01 PM UTC

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


AD Administrator Syncfusion Team September 3, 2004 02:39 PM UTC

Arun, Thank you very much. Regards, William


ES Eric Silver October 26, 2004 06:48 PM UTC

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 08:17 PM UTC

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

Loader.
Live Chat Icon For mobile
Up arrow icon