Share via


ServiceManager.Subscribe<TServiceType> Method (SubscribeServiceCallback<TServiceType>)

Requests that the specified method is called when a service of the specified type is available.

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

Syntax

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

Type Parameters

  • TServiceType

Parameters

Exceptions

Exception Condition
ArgumentNullException

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

Remarks

If the service is already available, this specified method is called immediately.

.NET Framework Security

See Also

Reference

ServiceManager Class

Subscribe Overload

Microsoft.Windows.Design Namespace

EditingContext

ContextItem

Unsubscribe

Publish

Other Resources

WPF Designer Extensibility