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
- callback
Type: Microsoft.Windows.Design.SubscribeContextCallback<TContextItemType>
A callback that is invoked when ContextItemType changes.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | callback is nulla null reference (Nothing in Visual Basic). |
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
See Also
Reference
Microsoft.Windows.Design Namespace
SubscribeContextCallback<TContextItemType>