Dela via


RequiresServiceAttribute Class

Indicates that the class relies on the specified service.

Namespace:  Microsoft.Windows.Design
Assembly:  Microsoft.Windows.Design.Extensibility (in Microsoft.Windows.Design.Extensibility.dll)

Syntax

'Declaration
<AttributeUsageAttribute(AttributeTargets.Class, AllowMultiple := True)> _
Public NotInheritable Class RequiresServiceAttribute _
    Inherits RequirementAttribute
'Usage
Dim instance As RequiresServiceAttribute
[AttributeUsageAttribute(AttributeTargets.Class, AllowMultiple = true)]
public sealed class RequiresServiceAttribute : RequirementAttribute
[AttributeUsageAttribute(AttributeTargets::Class, AllowMultiple = true)]
public ref class RequiresServiceAttribute sealed : public RequirementAttribute
public final class RequiresServiceAttribute extends RequirementAttribute

Remarks

You can apply RequiresServiceAttribute to any feature provider, any feature connector, or select classes that are offered by feature providers. The class is not instantiated until all services it requires are available.

Inheritance Hierarchy

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

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

RequiresServiceAttribute Members

Microsoft.Windows.Design Namespace

RequiresContextItemAttribute

UsesItemPolicyAttribute

PrimarySelectionPolicy

FeatureProvider

Other Resources

Feature Providers and Feature Connectors

Understanding WPF Designer Extensibility