I'm currently working on a C # WPF application that allows you to create a graph (that is, a bunch of vertices connected through edges), and then use this graph as a template to find it in a bunch of other (larger) graphs (" host "). Each element of the graph has at least a type and a label.
Graph elements (edges and vertices) can have different "types of constraints".
For example, there may be restrictions at the top. The label for this vertex must be "Vertex A" or "This vertex type" must be in the set {type A, Type B, Type H} ".
For edges, the types of constraints are a bit more complicated. The edge can be limited to either a βsimpleβ edge or a βpath edgeβ. The edge of the path between two vertices in the template graph can be considered a placeholder that allows you to find multiple edges (and vertices) between two vertices in the host graph. In contrast, a simple edge allows you to find only one edge (and without additional vertices) in the host graph.
If an edge has a path constraint (instead of the usual edge constraint), it has some additional properties, such as the minimum path length or valid vertex types allowed on the path.
The type constraint structure can be seen in this UML class diagram: 
~~~
Now from the point of view of the user interface: the user should be able to customize if the edge has a path restriction. If so, the necessary additional controls (TextBoxes, ListBoxes, etc.) should be automatically displayed for additional parameters. Changes in all controls should automatically be reflected in the data structure.
Here the user interface should behave as if changing the settings of the selected edge:
(There should also be a scroll bar on the right side on the right side, which allows you to scroll down and configure also acceptable types of edges on the path. Also ignore the settings for overlapping vertices and borders at the moment.)
~~~
Finally, my questions boil down to the following:
How do you implement such a dynamic object class change while maintaining the style of WPF data binding? (With a change in the class of dynamic objects, I mean that by clicking the "Treat this edge as a path" checkbox, the selected edge will receive a different type of constraint.)
Do I really need to create an old-school event listener that fires when the "Treat this edge as a path" checkbox changes and use it to manually update the visibility of other sidebar controls?
Would it help in any way if I somehow change the structure of the restriction class?