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

Displaying class diagrams automatically

1 Answer 66 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
Mirzodaler
Top achievements
Rank 1
Veteran
Mirzodaler asked on 19 Feb 2015, 06:35 AM
I have some .xml files that are packages of some classes. I want to show those classes in telerik wpf diagrams control as a class diagram.
What is the best way of displaying class diagrams in WPF from .xml files? It should also populate diagrams automatically, that there is a minimum number of intersections in connections. 

Thanks,

1 Answer, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 20 Feb 2015, 01:56 PM
Hello Mirzodaler,

The diagram can work with .xml files out of the box only if they are serialized and formatted using its serialization service. For example, the control exposes two methods that can be used to serialize/deserialize its shapes - Save() and Load(). The Save() method get all items defined in the RadDiagram and serialize them to an xml string. On the other hand the Load() method gets an xml string and loads items from it. Custom xml (custom tags, attributes, etc.) is not supported by the Load() method.

To display the information from the xml that contains the classes' packages you will need to manually parse the xml and create RadDiagramShapes (or whatever diagram item you need) based on the file's content.

About the last requirement in your post, I am not sure that I understand what you mean by that you want to populate the diagram automatically in the specific circumstances. Can you please give me more details on this. This will help me in better understanding your scenario.

Regards,
Martin
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
Mirzodaler
Top achievements
Rank 1
Veteran
Answers by
Martin Ivanov
Telerik team
Share this question
or