Diagram model binding mvvm way

I have a few comments that I hope will help you.

First, the model type should probably be GraphLinksModel<LogicDiagramNodeData, long, string, LogicDiagramLinkData>, since port identifiers are best handled as strings.

Second, you might as well be more specific about the type of your view model’s Model property, to be GraphLinksModel<LogicDiagramNodeData, long, string, LogicDiagramLinkData> instead of the more general IDiagramModel.

Third, in that Model setter you should check whether the value has actually changed before deciding to call OnPropertyChanged. You aren’t passing the property name either, I notice.

Fourth, I think there is a conflict between your binding both Diagram.NodesSource and Diagram.Model. (And Diagram.LinksSource is just like Diagram.NodesSource.) You should choose one or the other. If you choose binding the Model, I suspect it should be Mode=TwoWay.