This question is locked. New answers and comments are not allowed.
I would like to implement "floating labels", where each node in the diagram has a label located next to it but the label is not embedded within the node (see the attached image as an example). I realize that floating labels in a graph layout can be a very complex topic, and for now I am just looking to implement them in a basic way. The labels do not need to dynamically adjust to edges, but rather lets say we assign the labels to the middle-right of each node. So for each node, a label would appear to the middle and right (as in the image). There would be a limit to the text on the label as well. I assume this can be done where the labels themselves are separate nodes in the ObservableGraphSource (yes, this will need to be an MVVM approach). But, I wan to apply tree layouts and do not want the location of the nodes to be affected by the labels.
Initially, this is how I thought of doing it: Each node has a content template where the text is from a field in the view model, but the context template has a margin that pushes the text to the middle right of the node. While this seems do-able, it also seems lick a cheesy hack. I'd like to know if anyone else has had to do this and if so, is there any feedback you can share on how you approached it?
Much thanks in advance,
Mike
Initially, this is how I thought of doing it: Each node has a content template where the text is from a field in the view model, but the context template has a margin that pushes the text to the middle right of the node. While this seems do-able, it also seems lick a cheesy hack. I'd like to know if anyone else has had to do this and if so, is there any feedback you can share on how you approached it?
Much thanks in advance,
Mike