GoXam for WPF v3
CopyParts Method
Northwoods.GoXam Namespace > PartManager Class : CopyParts Method
a collection of Parts that are in this model
if null, this creates a model like this one by calling Northwoods.GoXam.Model.IDiagramModel.CreateInitializedCopy; the new model is available from the returned Northwoods.GoXam.Model.ICopyDictionary as its Northwoods.GoXam.Model.ICopyDictionary.DestinationModel property
Copy a collection of Parts from this model to a given model.
Syntax

Parameters

coll
a collection of Parts that are in this model
destmodel
if null, this creates a model like this one by calling Northwoods.GoXam.Model.IDiagramModel.CreateInitializedCopy; the new model is available from the returned Northwoods.GoXam.Model.ICopyDictionary as its Northwoods.GoXam.Model.ICopyDictionary.DestinationModel property

Return Value

an Northwoods.GoXam.Model.ICopyDictionary that maps original parts to the copied ones
Remarks

First this creates an Northwoods.GoXam.Model.IDataCollection of all of the data referenced by the collection of Parts. It ignores those parts for which CanCopy returns false.

Second it calls Northwoods.GoXam.Model.IDiagramModel.AddCollectionCopy to actually copy the data to the destination model.

This does not raise any Diagram events. Call CommandHandler.Copy if you want to copy the current selection into the clipboard. (It calls this method.)

See Also

Reference

PartManager Class
PartManager Members
DeleteParts(IEnumerable<Part>) Method