Part.IsSelected is definitely read-write. It’s a dependency property, so you can data-bind it.
However, it’s a regular dependency property on Part, not an attached dependency property on the root FrameworkElement of the Part’s visual tree (i.e. on Part.VisualElement).
I haven’t had the time to try this, but perhaps you could override PartManager.MakeNodeForData to call the base method and then establish programmatically the Binding that you want.
It work’s as needed for reloaded diagram and node programmatically created, but MakeNodeForData is not called when node is created using drag/drop from palette…
Could you tell me where set the same logic for these nodes ?
I just tried adding an override of PartManager.MakeNodeForData to the MyPartManager class in the FlowChart sample. It’s definitely being called for external drag-and-drop drops.
Perhaps you didn’t replace the standard Diagram.PartManager with your custom one for that particular Diagram?