Dynamically update nodes in the palette


I want to implement a palette which is to show all the recently used nodes.
I am just tracking the recently dropped node from DiagramExternalObjectsDropped event and using a list which is assigned to palette.Model.NodeSource I am updating the collection.

The issue I am facing here is that when I drag and drop a node to diagram the node is added to this recently used palette but the subsequent nodes are not shown on the UI at all. Though the list contains all the nodes which are added to the diagram.

My question is Is it that I can update the nodesource property of palette can be initialized only once? If Yes, Is there any other way that I follow to achieve dynamically updating the palette content?


Whenever you modify a model or its data, do you execute all those changes within a transaction?

Whenever I drag and drop a node on to the diagram, I add that node to the list which in turn is given to the nodesource of the palette. I expect that all the entries in the list to be shown in the palette.

I cannot tell from your answer, but it sounds like no, you are not executing a transaction on the palette when you are modifying the palette.