First I need to explain my code structure :
Assume “MyNode” is my Node.Data class.
I have a field : WeakReference _wr_myfield;
a property : MyStruct MyField
This field reference my internal structure “MyStruct”, which contains a color. (with Propertychange notification)
Well, in the node datatemplate I bind some border background with the myfield color.
Somewhere in my application I have an interface to modifiy Mystruct.Color.
My problem is that when I change the color for a node readed during the initialisation, all is ok, the binding is good.
But when I’d like to do the same for a node creating in the session (from a palette or with double-click) the new color is not setting until I change my envireonnement, saying I unload my user-control (change to an other view) and come back to the diagram view.
Now all is ok, also for the new node.
Have you an idea ?
I don’t think that the weakreference is the trouble, I tried to remove it and point directly to MyStruct.