为指定的类型标识符创建一个新的模型项。
命名空间:  Microsoft.Windows.Design.Model
程序集:  Microsoft.Windows.Design.Interaction(在 Microsoft.Windows.Design.Interaction.dll 中)
语法
声明
Public Shared Function CreateItem ( _
    context As EditingContext, _
    typeIdentifier As TypeIdentifier, _
    ParamArray arguments As Object() _
) As ModelItem
public static ModelItem CreateItem(
    EditingContext context,
    TypeIdentifier typeIdentifier,
    params Object[] arguments
)
public:
static ModelItem^ CreateItem(
    EditingContext^ context, 
    TypeIdentifier typeIdentifier, 
    ... array<Object^>^ arguments
)
static member CreateItem : 
        context:EditingContext * 
        typeIdentifier:TypeIdentifier * 
        arguments:Object[] -> ModelItem 
public static function CreateItem(
    context : EditingContext, 
    typeIdentifier : TypeIdentifier, 
    ... arguments : Object[]
) : ModelItem
参数
- context
 类型:Microsoft.Windows.Design.EditingContext
 设计器的编辑上下文。
- typeIdentifier
 类型:Microsoft.Windows.Design.Metadata.TypeIdentifier
 要创建的项的类型的标识符。
- arguments
 类型:array<System.Object[]
 一个应传递给该项的构造函数的可选参数数组。
返回值
类型:Microsoft.Windows.Design.Model.ModelItem
一个 ModelItem,表示新建的项类型。如果未能解析该类型标识符,则此方法可能会返回 nullnull 引用(在 Visual Basic 中为 Nothing)。
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。
请参见
参考
Microsoft.Windows.Design.Model 命名空间