Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Images are not shown in the MVC diagram (Read 2536 times)
Homam
Junior Member
**
Offline


I Love MindFusion!

Posts: 67
Joined: Feb 7th, 2012
Images are not shown in the MVC diagram
Sep 11th, 2013 at 9:01am
Print Post  
I saved a diagram as an XML file from a Windows Forms application, then, I'm loading it from an ASP.Net MVC application.

The diagram has been loaded well but the background images for the shapes haven't been loaded. What should I do?

  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Images are not shown in the MVC diagram
Reply #1 - Sep 11th, 2013 at 9:08am
Print Post  
At this time the JavaScript Diagram control cannot decode images from bytes saved in diagram files. It can only show images if they are specified via the ShapeNode.ImageUrl property. What you could do is set both ImageUrl and Image in the Windows Forms application, and distribute the images as separate files together with the diagram file.

Alternatively, after loading a file in MvcDiagram, loop over all nodes and call the node.Image.Save method to save the bitmaps in some image cache folder, and set node.ImageUrl to point to the corresponding file.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Homam
Junior Member
**
Offline


I Love MindFusion!

Posts: 67
Joined: Feb 7th, 2012
Re: Images are not shown in the MVC diagram
Reply #2 - Sep 12th, 2013 at 7:01am
Print Post  
Great. This solved my problem.

Thanks.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint