I tried to work with bound Properties on ConnectorShapes.
This works fine - as Long as I do not clear the InternalItems / InternalLinks in the Graph source.
First the Style (part of it)
Now my (simple) classes:
(forget about INPBase - it's just an implementation of INotifyPropertyChanged
Last not Least I have a "ViewModel" like this:
(of course in real code things are handled via commands - but that doesn't matter)
Everything works fine - as long as I'm not resetting the tree.
After this I get the debug message:
System.Windows.Data Error: 40 : BindingExpression path error: 'Visibility' property not found on 'object' ''TestVM' (HashCode=61656587)'. BindingExpression:Path=Visibility; DataItem='TestVM' (HashCode=61656587); target element is 'RadDiagramConnection' (Name=''); target property is 'Visibility' (type 'Visibility')
So it seems as if clearing the collections move the datacontext "on step up".
My Binding is simple the UserControl (hosting the diagram) has an Instance of TestVM as DataContext and the Diagram is bound like this: