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

SerializeNode with a collection property

1 Answer 84 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 1
Mark asked on 20 Jan 2015, 04:14 PM
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.

1 Answer, 1 is accepted

Sort by
0
Pavel R. Pavlov
Telerik team
answered on 23 Jan 2015, 08:47 AM
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.

Regards,
Pavel R. Pavlov
Telerik
 

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.

 
Tags
Diagram
Asked by
Mark
Top achievements
Rank 1
Answers by
Pavel R. Pavlov
Telerik team
Share this question
or