共用方式為


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 ,表示新建立的項目型別。如果無法解析型別識別項,這個方法可能傳回 nullNull 參照 (即 Visual Basic 中的 Nothing)。

例外狀況

例外狀況 條件
ArgumentNullException

context 或 memberName 是 nullNull 參照 (即 Visual Basic 中的 Nothing)。

.NET Framework 安全性

請參閱

參考

ModelFactory 類別

CreateStaticMemberItem 多載

Microsoft.Windows.Design.Model 命名空間

其他資源

WPF 設計工具擴充性

編輯模型架構