ContextItemManager.Subscribe<TContextItemType> Method (SubscribeContextCallback<TContextItemType>)

Adds a callback that is invoked when a context item of the specified item type changes.

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

Syntax

'Declaration
Public Sub Subscribe(Of TContextItemType As ContextItem) ( _
    callback As SubscribeContextCallback(Of TContextItemType) _
)
public void Subscribe<TContextItemType>(
    SubscribeContextCallback<TContextItemType> callback
)
where TContextItemType : ContextItem
public:
generic<typename TContextItemType>
where TContextItemType : ContextItem
void Subscribe(
    SubscribeContextCallback<TContextItemType>^ callback
)
member Subscribe : 
        callback:SubscribeContextCallback<'TContextItemType> -> unit  when 'TContextItemType : ContextItem
JScript does not support generic types or methods.

Type Parameters

  • TContextItemType

Parameters

Exceptions

Exception Condition
ArgumentNullException

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

.NET Framework Security

See Also

Reference

ContextItemManager Class

Subscribe Overload

Microsoft.Windows.Design Namespace

ContextItem

SubscribeContextCallback<TContextItemType>

ServiceManager

FeatureManager

Other Resources

Editing Context Architecture

Understanding WPF Designer Extensibility