DesignSurfaceElementOperations Class
Extends the IMS ElementOperations class by adding support for GhostShapeCollections.
Inheritance Hierarchy
System.Object
Microsoft.VisualStudio.Modeling.ElementOperations
Microsoft.VisualStudio.Modeling.Diagrams.DesignSurfaceElementOperations
Namespace: Microsoft.VisualStudio.Modeling.Diagrams
Assembly: Microsoft.VisualStudio.Modeling.Sdk.Diagrams.10.0 (in Microsoft.VisualStudio.Modeling.Sdk.Diagrams.10.0.dll)
Syntax
'Déclaration
Public Class DesignSurfaceElementOperations _
Inherits ElementOperations
public class DesignSurfaceElementOperations : ElementOperations
public ref class DesignSurfaceElementOperations : public ElementOperations
type DesignSurfaceElementOperations =
class
inherit ElementOperations
end
public class DesignSurfaceElementOperations extends ElementOperations
The DesignSurfaceElementOperations type exposes the following members.
Constructors
Name | Description | |
---|---|---|
DesignSurfaceElementOperations(IServiceProvider, Diagram) | Initializes a new instance of the DesignSurfaceElementOperations class for a specific diagram The model partition is assumed to be that of the model element the diagram is viewing. | |
DesignSurfaceElementOperations(IServiceProvider, Partition) | Initializes a new instance of the DesignSurfaceElementOperations class. Note that since no Diagram is specified, multiple diagrams will not be supported and any merged PELs will end up in the default diagram (the first created diagram viewing the model) | |
DesignSurfaceElementOperations(IServiceProvider, Partition, Diagram) | Initializes a new instance of the DesignSurfaceElementOperations class. |
Top
Properties
Name | Description | |
---|---|---|
Diagram | ||
Partition | (Inherited from ElementOperations.) | |
ServiceProvider | (Inherited from ElementOperations.) | |
Store | (Inherited from ElementOperations.) |
Top
Methods
Name | Description | |
---|---|---|
AddCustomFormat | Adds one or more custom data formats to the specified IDataObject using the specified collection of ModelElements. (Inherited from ElementOperations.) | |
AddElementGroupFormat(IDataObject, ICollection<ModelElement>, ClosureType) | Adds the ElementGroupPrototype format to the specified IDataObject using the specified collection of ModelElements. This method calls the following 3 overridable methods(in order) a. CreateElementGroup b. MarkRootElements c. CreateElementGroupPrototype It then stashes the created ElementGroupPrototype in the data parameter. (Inherited from ElementOperations.) | |
AddElementGroupFormat(IDataObject, ICollection<ModelElement>, ClosureType, Boolean) | Adds the ElementGroupPrototype format to the specified IDataObject using the specified collection of ModelElements. Can be called from derived classes to force demand load of element links in order to create the collection of model elements. (Inherited from ElementOperations.) | |
AddGhostShapesContext | Adds a GhostShapeCollection to the ElementGroupPrototype in the specified IDataObject. | |
CanAddCustomFormat | Returns a value indicating whether the ModelElement collection can be used to create a custom format. (Inherited from ElementOperations.) | |
CanAddElementGroupFormat | Returns a value indicating whether the ModelElement collection can be used to create an ElementGroupPrototype format. (Inherited from ElementOperations.) | |
CanCopy(ICollection<ModelElement>) | Gets a value indicating whether the collection of ModelElements can be copied to an IDataObject. (Inherited from ElementOperations.) | |
CanCopy(ICollection<ModelElement>, ClosureType) | Gets a value indicating whether the collection of ModelElements can be copied to an IDataObject. Calls CanCopyCore to do the work. (Inherited from ElementOperations.) | |
CanCopyCore | Gets a value indicating whether the collection of ModelElements can be copied to an IDataObject. (Inherited from ElementOperations.) | |
CanDelete(ModelElement, array<Guid[]) | Query whether a specified element can be deleted, taking into account any IMS locks applicable to any of the elements in the delete closure of the element. (Inherited from ElementOperations.) | |
CanDelete(IEnumerable<ModelElement>, array<Guid[]) | Query whether a specified set of elements can be deleted, taking into account any IMS locks applicable to any of the elements in the complete delete closure of the elements. (Inherited from ElementOperations.) | |
CanMerge | Returns a value indicating whether the ElementGroupPrototype from the IDataObject can be merged (i.e., pasted or dropped) into the target ModelElement. (Inherited from ElementOperations.) | |
CanMergeElementGroupPrototype(ModelElement, ElementGroupPrototype) | (Overrides ElementOperations.CanMergeElementGroupPrototype(ModelElement, ElementGroupPrototype).) | |
CanMergeElementGroupPrototype(ModelElement, ProtoElementBase, ElementGroupPrototype) | (Overrides ElementOperations.CanMergeElementGroupPrototype(ModelElement, ProtoElementBase, ElementGroupPrototype).) | |
CanMove | Gets a value indicating whether the collection of ModelElements can be moved. (Inherited from ElementOperations.) | |
ChooseMergeTarget(ModelElement, ElementGroup) | Gets the target element for the merge, given the proposed targetElement. This gives the ElementOperations the chance to change the intended target for the merge. By default, this method will give the target element the chance to change the intended target. (Overrides ElementOperations.ChooseMergeTarget(ModelElement, ElementGroup).) | |
ChooseMergeTarget(ModelElement, ElementGroupPrototype) | Gets the target element for the merge, given the proposed targetElement. This gives the ElementOperations the chance to change the intended target for the merge. By default, this method will give the target element the chance to change the intended target. (Overrides ElementOperations.ChooseMergeTarget(ModelElement, ElementGroupPrototype).) | |
Copy(IDataObject, ICollection<ModelElement>) | Copies the collection of ModelElements to the specified IDataObject in one or more data formats. (Inherited from ElementOperations.) | |
Copy(IDataObject, ICollection<ModelElement>, ClosureType) | Copies the collection of ModelElements to the specified IDataObject in one or more data formats. (Inherited from ElementOperations.) | |
Copy(IDataObject, ICollection<ModelElement>, PointF) | Copies the collection of ModelElements to the specified IDataObject in one or more data formats. (Inherited from ElementOperations.) | |
Copy(IDataObject, ICollection<ModelElement>, ClosureType, PointF) | Copies the collection of ModelElements to the specified IDataObject in one or more data formats. (Inherited from ElementOperations.) | |
CreateElementGroup | Creates a ClosureElementGroup (Inherited from ElementOperations.) | |
CreateElementGroupPrototype | (Inherited from ElementOperations.) | |
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetAssociatedModelElement | Gets the ProtoElement associated with the specified protoPresentationElement via the PresentationViewsSubject relationship. | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetTargetDiagramId | Get the Id of the Diagram targetted by an ElementGroupPrototype Merge/CanMerge originating from an instance of this class. | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MarkRootElements | Mark RootElements in the elementGroup parameter. (Inherited from ElementOperations.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
Merge(ModelElement, IDataObject) | Merges (i.e., pastes or drops) the ElementGroupPrototype from the IDataObject to the target ModelElement. (Inherited from ElementOperations.) | |
Merge(PresentationElement, IDataObject, PointF) | Merges (i.e., pastes or drops) the ElementGroupPrototype from the IDataObject to the target ModelElement. | |
MergeElementGroup | Merges the source ElementGroup with the specified target ModelElement. (Inherited from ElementOperations.) | |
MergeElementGroupPrototype(ModelElement, ElementGroupPrototype) | (Overrides ElementOperations.MergeElementGroupPrototype(ModelElement, ElementGroupPrototype).) | |
MergeElementGroupPrototype(ModelElement, ElementGroupPrototype, PointF) | Merges the source ElementGroupPrototype with the specified target ModelElement. | |
OnElementsReconstituted | Called by MergeElementGroupPrototype immediately after the elements from the ElementGroupPrototype have been reconstituted, but before they are connected to the rest of the model. (Inherited from ElementOperations.) | |
OnMerged | Called by MergeElementGroupPrototype immediately before the local transaction is committed. The rules are queued during the local transaction and fired when the transaction commits. The local transaction wraps reconstituting and connecting elements. This method raises the custom model event ShapeElementViewFixupEvent for every root protoElement PEL that doesn't have a corresponding protoElement MEL. The rule processing of this event connects the PEL to the diagram if it isn't already. (Overrides ElementOperations.OnMerged(MergeElementGroupEventArgs).) | |
OnMerging | Called by MergeElementGroupPrototype immediately after the target element has been chosen, but before the elements from the ElementGroupPrototype have been reconstituted. (Inherited from ElementOperations.) | |
PropagateElementGroupContextToTransaction | (Overrides ElementOperations.PropagateElementGroupContextToTransaction(ModelElement, ElementGroup, Transaction).) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Top
Events
Name | Description | |
---|---|---|
ElementsReconstituted | Called by MergeElementGroupPrototype immediately after the elements from the ElementGroupPrototype have been reconstituted, but before they are connected to the rest of the model. (Inherited from ElementOperations.) | |
Merged | Called by MergeElementGroupPrototype immediately before the local transaction is committed. The rules are queued during the local transaction and fired when the transaction commits. The local transaction wraps reconstituting and connecting elements. (Inherited from ElementOperations.) | |
Merging | Called by MergeElementGroupPrototype immediately after the target element has been chosen, but before the elements from the ElementGroupPrototype have been reconstituted. (Inherited from ElementOperations.) |
Top
Fields
Name | Description | |
---|---|---|
TargetDiagramIdContextKey | Key of the element Id of the diagram in the TargetConext of merged ElementGroupPrototypes |
Top
Remarks
Derive from this class to create custom data formats for copy and paste operations.
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.