Find the dragged over node programmatically

I am dragging a node from the palette to the main diagram which I have a tree view of organization chart. When the dragged part is on top of a node, the node is highlighted and this is done in Xaml. When I release the mouse on the highlighted node, the dragged node is linked to the Treeview as a child to the highlighted node. How can I know which node in the tree is highlighted programmatically? Thanks.

At the time of the Diagram.ExternalObjectsDropped event, the Diagram.Selection tells you what was dropped.

If instead you need to get continuous updates during the drag, you can override DraggingTool.DragOver to call the base method and then look at the value of DraggingTool.DragOverPart.

I have no pormblem gettting the dragged. I was asking about the node in the treeView (on the main diagram) that was highlighted when a part is dragged over it. Is there a way to get the node on the treView?

As I said, during the drag, you can look at DraggingTool.DragOverPart.

After the drop, you can look at what’s connected to the Diagram.Selection.
Or you can just find the Part that is at the current mouse point, ignoring the selection or newly created parts.