Share via


RequiresServiceAttribute.CreateSubscription Method

Creates an object that enables notification when the requirement specified by this attribute is fulfilled by the editing context.

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

Syntax

'Declaration
Public Overrides Function CreateSubscription ( _
    context As EditingContext _
) As RequirementSubscription
public override RequirementSubscription CreateSubscription(
    EditingContext context
)
public:
virtual RequirementSubscription^ CreateSubscription(
    EditingContext^ context
) override
abstract CreateSubscription : 
        context:EditingContext -> RequirementSubscription 
override CreateSubscription : 
        context:EditingContext -> RequirementSubscription 
public override function CreateSubscription(
    context : EditingContext
) : RequirementSubscription

Parameters

Return Value

Type: Microsoft.Windows.Design.RequirementSubscription
A RequirementSubscription object that you can use to handle events.

Exceptions

Exception Condition
ArgumentNullException

context is nulla null reference (Nothing in Visual Basic).

Remarks

The RequirementSubscription object created by the CreateSubscription method allows the caller to be notified when the required ServiceType is available in the editing context.

.NET Framework Security

See Also

Reference

RequiresServiceAttribute Class

Microsoft.Windows.Design Namespace

RequiresContextItemAttribute

UsesItemPolicyAttribute

PrimarySelectionPolicy

FeatureProvider

Other Resources

Feature Providers and Feature Connectors

Understanding WPF Designer Extensibility