共用方式為


ContextItemManager.Contains 方法 (Type)

在衍生類別 (Derived Class) 中遭覆寫時會傳回值,表示內容項目管理員是否內含指定型別的項目。

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

語法

'宣告
Public MustOverride Function Contains ( _
    itemType As Type _
) As Boolean
public abstract bool Contains(
    Type itemType
)
public:
virtual bool Contains(
    Type^ itemType
) abstract
abstract Contains : 
        itemType:Type -> bool 
public abstract function Contains(
    itemType : Type
) : boolean

參數

  • itemType
    型別:System.Type
    要檢查的項目型別。

傳回值

型別:System.Boolean
如果內容包含這個項目型別的執行個體,則為 true,否則為 false。

例外狀況

例外狀況 條件
ArgumentNullException

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

.NET Framework 安全性

請參閱

參考

ContextItemManager 類別

Contains 多載

Microsoft.Windows.Design 命名空間

ContextItem

SubscribeContextCallback<TContextItemType>

ServiceManager

FeatureManager

其他資源

編輯內容架構

了解 WPF 設計工具擴充性