ElementOperations.Copy Method  
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Copy(IDataObject, ICollection<ModelElement>, ClosureType, PointF) | Copies the collection of ModelElements to the specified IDataObject in one or more data formats. | 
| Copy(IDataObject, ICollection<ModelElement>, PointF) | Copies the collection of ModelElements to the specified IDataObject in one or more data formats. | 
| Copy(IDataObject, ICollection<ModelElement>) | Copies the collection of ModelElements to the specified IDataObject in one or more data formats. | 
| Copy(IDataObject, ICollection<ModelElement>, ClosureType) | Copies the collection of ModelElements to the specified IDataObject in one or more data formats. | 
Copy(IDataObject, ICollection<ModelElement>, ClosureType, PointF)
Copies the collection of ModelElements to the specified IDataObject in one or more data formats.
public:
 virtual void Copy(System::Windows::Forms::IDataObject ^ data, System::Collections::Generic::ICollection<Microsoft::VisualStudio::Modeling::ModelElement ^> ^ elements, Microsoft::VisualStudio::Modeling::ClosureType closureType, System::Drawing::PointF sourcePosition);public virtual void Copy(System.Windows.Forms.IDataObject data, System.Collections.Generic.ICollection<Microsoft.VisualStudio.Modeling.ModelElement> elements, Microsoft.VisualStudio.Modeling.ClosureType closureType, System.Drawing.PointF sourcePosition);abstract member Copy : System.Windows.Forms.IDataObject * System.Collections.Generic.ICollection<Microsoft.VisualStudio.Modeling.ModelElement> * Microsoft.VisualStudio.Modeling.ClosureType * System.Drawing.PointF -> unit
override this.Copy : System.Windows.Forms.IDataObject * System.Collections.Generic.ICollection<Microsoft.VisualStudio.Modeling.ModelElement> * Microsoft.VisualStudio.Modeling.ClosureType * System.Drawing.PointF -> unitPublic Overridable Sub Copy (data As IDataObject, elements As ICollection(Of ModelElement), closureType As ClosureType, sourcePosition As PointF)Parameters
- data
- IDataObject
The IDataObject to add the data formats to.
- elements
- ICollection<ModelElement>
The collection of ModelElements to copy.
- closureType
- ClosureType
The type of closure to use to filter the elements.
- sourcePosition
- PointF
The mouse position where the drop occured, PointF.Empty if not a drag/drop operation.
Remarks
The supported formats: (1) ElementGroupPrototype, and (2) custom formats
Applies to
Copy(IDataObject, ICollection<ModelElement>, PointF)
Copies the collection of ModelElements to the specified IDataObject in one or more data formats.
public:
 void Copy(System::Windows::Forms::IDataObject ^ data, System::Collections::Generic::ICollection<Microsoft::VisualStudio::Modeling::ModelElement ^> ^ elements, System::Drawing::PointF sourcePosition);public void Copy(System.Windows.Forms.IDataObject data, System.Collections.Generic.ICollection<Microsoft.VisualStudio.Modeling.ModelElement> elements, System.Drawing.PointF sourcePosition);member this.Copy : System.Windows.Forms.IDataObject * System.Collections.Generic.ICollection<Microsoft.VisualStudio.Modeling.ModelElement> * System.Drawing.PointF -> unitPublic Sub Copy (data As IDataObject, elements As ICollection(Of ModelElement), sourcePosition As PointF)Parameters
- data
- IDataObject
The IDataObject to add the data formats to.
- elements
- ICollection<ModelElement>
The collection of ModelElements to copy.
- sourcePosition
- PointF
The mouse position where the drop occured, PointF.Empty if not a drag/drop operation.
Remarks
The supported formats: (1) ElementGroupPrototype, and (2) custom formats
Applies to
Copy(IDataObject, ICollection<ModelElement>)
Copies the collection of ModelElements to the specified IDataObject in one or more data formats.
public:
 void Copy(System::Windows::Forms::IDataObject ^ data, System::Collections::Generic::ICollection<Microsoft::VisualStudio::Modeling::ModelElement ^> ^ elements);public void Copy(System.Windows.Forms.IDataObject data, System.Collections.Generic.ICollection<Microsoft.VisualStudio.Modeling.ModelElement> elements);member this.Copy : System.Windows.Forms.IDataObject * System.Collections.Generic.ICollection<Microsoft.VisualStudio.Modeling.ModelElement> -> unitPublic Sub Copy (data As IDataObject, elements As ICollection(Of ModelElement))Parameters
- data
- IDataObject
The IDataObject to add the data formats to.
- elements
- ICollection<ModelElement>
The collection of ModelElements to copy.
Remarks
The supported formats: (1) ElementGroupPrototype, and (2) custom formats
Applies to
Copy(IDataObject, ICollection<ModelElement>, ClosureType)
Copies the collection of ModelElements to the specified IDataObject in one or more data formats.
public:
 void Copy(System::Windows::Forms::IDataObject ^ data, System::Collections::Generic::ICollection<Microsoft::VisualStudio::Modeling::ModelElement ^> ^ elements, Microsoft::VisualStudio::Modeling::ClosureType closureType);public void Copy(System.Windows.Forms.IDataObject data, System.Collections.Generic.ICollection<Microsoft.VisualStudio.Modeling.ModelElement> elements, Microsoft.VisualStudio.Modeling.ClosureType closureType);member this.Copy : System.Windows.Forms.IDataObject * System.Collections.Generic.ICollection<Microsoft.VisualStudio.Modeling.ModelElement> * Microsoft.VisualStudio.Modeling.ClosureType -> unitPublic Sub Copy (data As IDataObject, elements As ICollection(Of ModelElement), closureType As ClosureType)Parameters
- data
- IDataObject
The IDataObject to add the data formats to.
- elements
- ICollection<ModelElement>
The collection of ModelElements to copy.
- closureType
- ClosureType
The closure of ModelElements to copy.
Remarks
The supported formats: (1) ElementGroupPrototype, and (2) custom formats