Good day! I have a database in which information about the connections of objects is stored. All objects are of the same type, and each object is associated with other objects. Suppose there are two classes:
class Object { public int Id{get;set;} public string Name{get;set;} public Object(int id, string name) { Id = id; Name = name; } } class Relation { public Object obj1{get;set;} public Object obj2{get;set;} public Relation(Object o1, Object o2) { obj1 = o1; obj2 = o2; } } And let the data be stored in this way:
List<Relation> relations = new List<Relation>(); based on the available data, I implemented the generation of a DGML file that would visually reflect the connections of the objects. I’ve got a graph, for example, like this: http://www.softwareprocessengineering.com/_SPDiag/DGMLNOGroups.jpg But the problem is that windows forms do not have an element of management that can reflect the DGML file directly on the form, and there is no method which would allow to convert DGML to image. What alternative way could I implement such an image? I tried to implement it manually through Graphics, but I have no idea how to sort objects in such a way that the graph is ordered as in DGML and “porridge-mala” does not come out. How can you implement DGML-like visualization?