다음을 통해 공유


ModelElement.ChooseMergeTarget Method

Include Protected Members
Include Inherited Members

Selects a target element to accept as its child an element that the user wants to copy, drag, or create.

This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.

Overload List

  Name Description
Protected method ChooseMergeTarget(ElementGroup) Selects a target element to accept as its child an element that the user wants to copy, drag, or create.
Protected method ChooseMergeTarget(ElementGroupPrototype) Selects a target element to accept as its child an element that the user wants to copy, drag, or create.

Top

Remarks

A merge operation is what happens when the user uses a tool to create a model element, or performs the paste command, or drags an element onto another. Merge combines the new or copied elements into the existing model.

This method is called when a merge is about to happen. It allows the target element to redirect the merge operation so that another element is the target. For example, a part of a larger object could redirect the merge operation to its parent. This is a benefit for the user, who does not have to distinguish between the part and its parent when dragging a tool or object.

The default method returns this element as the target.

See Also

Reference

ModelElement Class

Microsoft.VisualStudio.Modeling Namespace