RequiresContextItemAttribute 类

更新:2007 年 11 月

指示该类依赖于指定的上下文。

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

语法

声明
<AttributeUsageAttribute(AttributeTargets.Class, AllowMultiple := True)> _
Public NotInheritable Class RequiresContextItemAttribute _
    Inherits RequirementAttribute
用法
Dim instance As RequiresContextItemAttribute
[AttributeUsageAttribute(AttributeTargets.Class, AllowMultiple = true)]
public sealed class RequiresContextItemAttribute : RequirementAttribute
[AttributeUsageAttribute(AttributeTargets::Class, AllowMultiple = true)]
public ref class RequiresContextItemAttribute sealed : public RequirementAttribute
public final class RequiresContextItemAttribute extends RequirementAttribute

备注

可以将 RequiresContextItemAttribute 应用于任何功能提供程序和任何功能连接器或者选择由功能提供程序提供的类。直到该类所必需的所有上下文项都可用后该类才实例化。

继承层次结构

System.Object
  System.Attribute
    Microsoft.Windows.Design.RequirementAttribute
      Microsoft.Windows.Design.RequiresContextItemAttribute

线程安全

此类型的任何公共 static(在 Visual Basic 中为 Shared) 成员都是线程安全的。但不保证所有实例成员都是线程安全的。

另请参见

参考

RequiresContextItemAttribute 成员

Microsoft.Windows.Design 命名空间

RequiresServiceAttribute

UsesItemPolicyAttribute

FeatureProvider

FeatureConnector<TFeatureProviderType>

其他资源

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

了解 WPF 设计器扩展性