ContextItemManager.Subscribe 方法

定义

重载

Subscribe(Type, SubscribeContextCallback)

在派生类中重写时,添加一个将在指定项类型的上下文项发生更改时进行调用的事件回调。

Subscribe<TContextItemType>(SubscribeContextCallback<TContextItemType>)

添加一个将在指定项类型的上下文项发生更改时进行调用的事件回调。

Subscribe(Type, SubscribeContextCallback)

在派生类中重写时,添加一个将在指定项类型的上下文项发生更改时进行调用的事件回调。

public:
 abstract void Subscribe(Type ^ contextItemType, System::Activities::Presentation::SubscribeContextCallback ^ callback);
public abstract void Subscribe (Type contextItemType, System.Activities.Presentation.SubscribeContextCallback callback);
abstract member Subscribe : Type * System.Activities.Presentation.SubscribeContextCallback -> unit
Public MustOverride Sub Subscribe (contextItemType As Type, callback As SubscribeContextCallback)

参数

contextItemType
Type

要订阅的项的类型。

callback
SubscribeContextCallback

SubscribeContextCallback 发生更改时调用的 contextItemType

例外

contextItemTypecallbacknull

适用于

Subscribe<TContextItemType>(SubscribeContextCallback<TContextItemType>)

添加一个将在指定项类型的上下文项发生更改时进行调用的事件回调。

public:
generic <typename TContextItemType>
 where TContextItemType : System::Activities::Presentation::ContextItem void Subscribe(System::Activities::Presentation::SubscribeContextCallback<TContextItemType> ^ callback);
public void Subscribe<TContextItemType> (System.Activities.Presentation.SubscribeContextCallback<TContextItemType> callback) where TContextItemType : System.Activities.Presentation.ContextItem;
member this.Subscribe : System.Activities.Presentation.SubscribeContextCallback<'ContextItemType (requires 'ContextItemType :> System.Activities.Presentation.ContextItem)> -> unit (requires 'ContextItemType :> System.Activities.Presentation.ContextItem)
Public Sub Subscribe(Of TContextItemType As ContextItem) (callback As SubscribeContextCallback(Of TContextItemType))

类型参数

TContextItemType

要订阅的项的类型。

参数

callback
SubscribeContextCallback<TContextItemType>

SubscribeContextCallback<TContextItemType> 发生更改时调用的 contextItemType

例外

contextItemTypecallbacknull

适用于