ContextItemManager.Subscribe Method (Type, SubscribeContextCallback)
When overridden in a derived class, 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 MustOverride Sub Subscribe ( _
contextItemType As Type, _
callback As SubscribeContextCallback _
)
public abstract void Subscribe(
Type contextItemType,
SubscribeContextCallback callback
)
public:
virtual void Subscribe(
Type^ contextItemType,
SubscribeContextCallback^ callback
) abstract
abstract Subscribe :
contextItemType:Type *
callback:SubscribeContextCallback -> unit
public abstract function Subscribe(
contextItemType : Type,
callback : SubscribeContextCallback
)
Parameters
- contextItemType
Type: System.Type
The type of item to subscribe to.
- callback
Type: Microsoft.Windows.Design.SubscribeContextCallback
A callback that will be invoked when contextItemType changes.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | contextItemType or 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>