共用方式為


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

您要訂閱的項目型別。

參數

例外狀況

contextItemTypecallbacknull

適用於