Share via


ModelFactory.CreateStaticMemberItem 方法 (EditingContext, TypeIdentifier, String)

[本文档仅供预览,在以后的发行版中可能会发生更改。包含的空白主题用作占位符。]

新建一个表示指定类的静态成员值的模型项。

命名空间:  Microsoft.Windows.Design.Model
程序集:  Microsoft.Windows.Design.Interaction(在 Microsoft.Windows.Design.Interaction.dll 中)

语法

声明
Public Shared Function CreateStaticMemberItem ( _
    context As EditingContext, _
    typeIdentifier As TypeIdentifier, _
    memberName As String _
) As ModelItem
public static ModelItem CreateStaticMemberItem(
    EditingContext context,
    TypeIdentifier typeIdentifier,
    string memberName
)
public:
static ModelItem^ CreateStaticMemberItem(
    EditingContext^ context, 
    TypeIdentifier typeIdentifier, 
    String^ memberName
)
static member CreateStaticMemberItem : 
        context:EditingContext * 
        typeIdentifier:TypeIdentifier * 
        memberName:string -> ModelItem 
public static function CreateStaticMemberItem(
    context : EditingContext, 
    typeIdentifier : TypeIdentifier, 
    memberName : String
) : ModelItem

参数

  • memberName
    类型:System.String
    所引用的静态成员的名称。

返回值

类型:Microsoft.Windows.Design.Model.ModelItem
一个 ModelItem,表示新建的项类型。如果未能解析该类型标识符,则此方法可能会返回 nulla null reference (Nothing in Visual Basic)。

异常

异常 条件
ArgumentNullException

context 或 memberName 为 nulla null reference (Nothing in Visual Basic)。

.NET Framework 安全性

请参见

参考

ModelFactory 类

CreateStaticMemberItem 重载

Microsoft.Windows.Design.Model 命名空间

其他资源

WPF 设计器扩展性

编辑模型体系结构