How can I show a image in a RadDiagram

1 Answer 54 Views
Diagram, DiagramRibbonBar, DiagramToolBox
Shen
Top achievements
Rank 1
Shen asked on 21 Aug 2022, 08:28 AM
I'm trying to show a topology structure of a hardware system via radDiagram, however, didn't find the way to display a image inside a RadDiagramShape.  Someone help me plz?
Ahsan
Top achievements
Rank 1
commented on 23 Aug 2022, 04:39 AM

I'm using RadDiagram for making a designer in our system. I have three parts in my screen, (RadDiagramRadDiagramToolBox and ToolBar).

What I have to display in my RadDiagramToolBox are icons (images for my custom shapes). For a reason, my custom shapes can not inherit from RadDiagramShape. That's why the RadDiagram didn't accept my custom shapes and I made MyDesigner which is inhering from RadDiagram, and override the this.Drop += MyDesigner_Drop;

 

Dess | Tech Support Engineer, Principal
Telerik team
commented on 23 Aug 2022, 04:43 AM

Hi, Ahsan, 

The following KB article demonstrates a sample approach how to add custom items in the RadDiagramToolbox:

https://docs.telerik.com/devtools/winforms/knowledge-base/add-custom-items-to-diagram-toolbox 

 Whenever the end-user drags the item from the toolbox and drop it onto the diagram, a shape with the respective shape will be created. 

1 Answer, 1 is accepted

Sort by
0
Accepted
Dess | Tech Support Engineer, Principal
Telerik team
answered on 22 Aug 2022, 02:29 PM

Hello, Shen,

Please refer to the following forum post demonstrating how to show an image in RadDiagramShape:

https://www.telerik.com/forums/resizing-text-and-images#4337941 

I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

Regards,
Dess | Tech Support Engineer, Principal
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Shen
Top achievements
Rank 1
commented on 23 Aug 2022, 05:51 AM

thanks Dess It works
Tags
Diagram, DiagramRibbonBar, DiagramToolBox
Asked by
Shen
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or