GoXam for WPF v3
AddLinkForData(Object,IDiagramModel) Method
Northwoods.GoXam Namespace > PartManager Class > AddLinkForData Method : AddLinkForData(Object,IDiagramModel) Method
the data in the model that holds link relationship information
the model that the linkdata is in, an Northwoods.GoXam.Model.ILinksModel
Make sure a Link exists for some data in the model, added to the LinkLayer specified by its LayerName.
Syntax
public Link AddLinkForData( 
   object linkdata,
   IDiagramModel model
)

Parameters

linkdata
the data in the model that holds link relationship information
model
the model that the linkdata is in, an Northwoods.GoXam.Model.ILinksModel

Return Value

the Link for the linkdata, either an existing one or a newly created one, or null if FilterLinkForData(Object,IDiagramModel) returns false or if the diagram is uninitialized
Remarks

If the diagram already has a Link for the data, as determined by FindLinkForData(Object,IDiagramModel), or if FilterLinkForData(Object,IDiagramModel) is false, this method will do nothing.

If the linkdata is a Link and if the model is a Northwoods.GoXam.Model.PartsModel, this method doesn't need to construct a new link by calling MakeLinkForData, but can just add the link to the diagram, in the appropriate Layer determined by the LayerName.

The implementation of this method should not modify the model.

See Also

Reference

PartManager Class
PartManager Members
Overload List