export diagram with images

5 posts, 0 answers
  1. Karim
    Karim avatar
    11 posts
    Member since:
    Nov 2011

    Posted 09 Jan 2014 Link to this post

    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
  2. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 14 Jan 2014 Link to this post

    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 >>
  3. DevCraft banner
  4. Karim
    Karim avatar
    11 posts
    Member since:
    Nov 2011

    Posted 14 Jan 2014 Link to this post

    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


  5. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 17 Jan 2014 Link to this post

    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 >>
  6. Karim
    Karim avatar
    11 posts
    Member since:
    Nov 2011

    Posted 17 Jan 2014 Link to this post

    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.
Back to Top
DevCraft banner