ContextItemManager.Contains 方法 (Type)

当在派生类中重写时,返回一个值,该值指示上下文项管理器是否包含指定类型的项。

命名空间:  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 设计器扩展性