RequiresContextItemAttribute 构造函数

初始化 RequiresContextItemAttribute 类的新实例。

命名空间:  Microsoft.Windows.Design
程序集:  Microsoft.Windows.Design.Extensibility(在 Microsoft.Windows.Design.Extensibility.dll 中)

语法

声明
Public Sub New ( _
    contextItemType As Type _
)
public RequiresContextItemAttribute(
    Type contextItemType
)
public:
RequiresContextItemAttribute(
    Type^ contextItemType
)
new : 
        contextItemType:Type -> RequiresContextItemAttribute
public function RequiresContextItemAttribute(
    contextItemType : Type
)

参数

  • contextItemType
    类型:System.Type
    所需上下文的类型。

备注

此属性指示依靠指定上下文的类,并且只有在将值设置到上下文中后才会对该类进行实例化。

提示

所有上下文都具有默认值,但激活机制需要外部实体将一个值推入上下文中。

.NET Framework 安全性

请参见

参考

RequiresContextItemAttribute 类

Microsoft.Windows.Design 命名空间

RequiresServiceAttribute

UsesItemPolicyAttribute

FeatureProvider

FeatureConnector<TFeatureProviderType>

其他资源

功能提供程序和功能连接器

了解 WPF 设计器扩展性