CoreDesignSurfaceDomainModel.CreateElement 方法

定义

创建指定类型的元素。

public:
 override Microsoft::VisualStudio::Modeling::ModelElement ^ CreateElement(Microsoft::VisualStudio::Modeling::Partition ^ partition, Type ^ elementType, cli::array <Microsoft::VisualStudio::Modeling::PropertyAssignment ^> ^ propertyAssignments);
public override sealed Microsoft.VisualStudio.Modeling.ModelElement CreateElement (Microsoft.VisualStudio.Modeling.Partition partition, Type elementType, Microsoft.VisualStudio.Modeling.PropertyAssignment[] propertyAssignments);
override this.CreateElement : Microsoft.VisualStudio.Modeling.Partition * Type * Microsoft.VisualStudio.Modeling.PropertyAssignment[] -> Microsoft.VisualStudio.Modeling.ModelElement
Public Overrides NotOverridable Function CreateElement (partition As Partition, elementType As Type, propertyAssignments As PropertyAssignment()) As ModelElement

参数

partition
Partition

要在其中创建元素的分区。

elementType
Type

属于此域模型的元素类型。

propertyAssignments
PropertyAssignment[]

新的元素属性赋值。

返回

ModelElement

已创建元素。

适用于