共用方式為


ContextItemManager.GetValue 方法 (Type)

在衍生類別 (Derived Class) 中遭覆寫時,會傳回指定之項目型別的執行個體。

命名空間:  Microsoft.Windows.Design
組件:  Microsoft.Windows.Design.Extensibility (在 Microsoft.Windows.Design.Extensibility.dll 中)

語法

'宣告
Public MustOverride Function GetValue ( _
    itemType As Type _
) As ContextItem
public abstract ContextItem GetValue(
    Type itemType
)
public:
virtual ContextItem^ GetValue(
    Type^ itemType
) abstract
abstract GetValue : 
        itemType:Type -> ContextItem 
public abstract function GetValue(
    itemType : Type
) : ContextItem

參數

  • itemType
    型別:System.Type
    要傳回之項目的型別。

傳回值

型別:Microsoft.Windows.Design.ContextItem
要求之型別的內容項目。如果這個型別的內容中沒有任何項目,則會建立一個預設項目。

例外狀況

例外狀況 條件
ArgumentNullException

itemType 為 nullNull 參照 (即 Visual Basic 中的 Nothing)。

.NET Framework 安全性

請參閱

參考

ContextItemManager 類別

GetValue 多載

Microsoft.Windows.Design 命名空間

ContextItem

SubscribeContextCallback<TContextItemType>

ServiceManager

FeatureManager

其他資源

編輯內容架構

了解 WPF 設計工具擴充性