This is a migrated thread and some comments may be shown as answers.

export diagram with images

4 Answers 19 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
Karim
Top achievements
Rank 1
Karim asked on 09 Jan 2014, 03:26 PM
Hi,
I'm working on the "Drawing" example of the Demo and i wonder if it's possible to export diagram to XML format with Images in it.
If it possible i'd like to see an example of this, if not are there an other way to export the Diagram with images in it (export it as XAML for example ?)

Thanks

4 Answers, 1 is accepted

Sort by
0
Petar Mladenov
Telerik team
answered on 14 Jan 2014, 09:55 AM
Hi Karim,

It is possible to achieve this goal but we think it is far away from elegant. Imagine a Diagram with many shapes and every shape has image in it. This will result in big XML file which stores the images in binary/string format. This file will slow down loading and so on. The better approach is to serialize / save the path to every image and on load / deserialize just resolve the path and use it to display the Image.
In this help article you can see how ViewModel's properties are serialized. For every shape you can have ImagePath (string) property in your ViewModel.

We hope this will help you proceed further.

Regards,
Petar Mladenov
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Karim
Top achievements
Rank 1
answered on 14 Jan 2014, 10:35 AM
Hi Petar,

Thanks a lot for your prompt answer.
Actually the problem was deep than that . we have an issue of "cannot change the source of graph when it set".
It means if we import a diagram containing Images and the Graph source is set, we cannot even Drag and Drop a new shape ou add /copy ....
I think when the Source of diagram is Set it become Read-only so we cannot add new item. This is a problem of one Way Binding.

Any soultion for us to avoid this big issue during our developement??
i heard that this problem will be fixed in Q3 2013 version is it true??


thanks in advance for your answer

Regards

Karim


0
Petar Mladenov
Telerik team
answered on 17 Jan 2014, 07:40 AM
Hello Karim,

Could you please confirm that you are using SerializableGraphSourceBase - this class is suitable for binding the GraphSource two-way and supports serialization? Which is the exact issue that you have seed scheduled for Q3 2013 ?

Regards,
Petar Mladenov
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Karim
Top achievements
Rank 1
answered on 17 Jan 2014, 02:06 PM
Hi Petar,

I confirm that, but finally i guess that i will not use GraphSource, i found an other solution wich had resolved my issue.

Thank you.
Tags
Diagram
Asked by
Karim
Top achievements
Rank 1
Answers by
Petar Mladenov
Telerik team
Karim
Top achievements
Rank 1
Share this question
or