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
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
0
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
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 >>
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
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
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
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 >>
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.
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.