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 安全性
- 完全信任立即呼叫者。這個成員無法供部分信任的程式碼使用。如需詳細資訊,請參閱從部分受信任程式碼使用程式庫。
請參閱
參考
SubscribeContextCallback<TContextItemType>