I’m trying to dynamically (programmatically) change the appearance of a node, and i don’t understand how i can do this.
i would like to drag a node from the palette to the diagram and change its appearance once it is dropped on the diagram. The node in the palette have a simple appearance and i would like the dropped node to have a more complex one.
At the moment, i have tried to define 2 dataTemplates in my NodeTemplateDictionnary, which corresponds to 2 categories, and change the node category during the OnNodeAdded() method of my custom PartManager. But that do not force the node to redraw with its new appearance. i presume only change the category isn’t sufficient.
I also would like to be able change the appearance on other types of interaction between the UI and the user, such as a click on a button or almost any kind of event.
Is there a way to do that ? And How ?
Thanks for your help.