SerializeNode with a collection property

2 posts, 0 answers
  1. Mark
    Mark avatar
    3 posts
    Member since:
    Jun 2012

    Posted 20 Jan 2015 Link to this post

    I'm currently using the RadDiagram with MVVM. Inside my SerializableGraphSourceBase I have the overridden SerializeNode. When Saving the xml of my diagram this works as expected for all my basic properties such as

    public string Header { get; set; }

    I'm wondering if there is a way to do this for a property that is a list or collection

    public ObservableCollection<DiagramNodeProperty> DiagramNodeProperties { get; set; }

    Any help would be greatly appreciated.
  2. Pavel R. Pavlov
    Pavel R. Pavlov avatar
    1167 posts

    Posted 23 Jan 2015 Link to this post

    Hi Mark,

    When working with the Serialization feature of the RadDiagram you need to keep in mind that it actually does not serialize the properties themself. Instead the RadDiagarm serializes information for the properties that later can be used to restore the correct values. In this way of thinking if you are able to somehow serialize information for your custom collection in a way that you will be able to restore the exact same items, you will be able to extend the serialization feature. You can find how you can serialize custom properties in our Serialization article.

    Please take a look at it and let me know if you need any further assistance.

    Pavel R. Pavlov

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

  3. DevCraft banner
Back to Top