Displaying class diagrams automatically

2 posts, 0 answers
  1. Mirzodaler
    Mirzodaler avatar
    1 posts
    Member since:
    Jun 2014

    Posted 19 Feb 2015 Link to this post

    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. 

  2. Martin Ivanov
    Martin Ivanov avatar
    1443 posts

    Posted 20 Feb 2015 Link to this post

    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.


    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.

Back to Top