Share via


RequiresContextItemAttribute.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 ContextItem is available in the editing context.

.NET Framework Security

See Also

Reference

RequiresContextItemAttribute Class

Microsoft.Windows.Design Namespace

RequiresServiceAttribute

UsesItemPolicyAttribute

FeatureProvider

FeatureConnector<TFeatureProviderType>

Other Resources

Feature Providers and Feature Connectors

Understanding WPF Designer Extensibility