加入回呼方法,當編輯內容中的選取範圍變更時會叫用這個回呼方法。
命名空間: Microsoft.Windows.Design.Interaction
組件: Microsoft.Windows.Design.Interaction (在 Microsoft.Windows.Design.Interaction.dll 中)
語法
'宣告
Public Shared Sub Subscribe ( _
context As EditingContext, _
handler As SubscribeContextCallback(Of Selection) _
)
public static void Subscribe(
EditingContext context,
SubscribeContextCallback<Selection> handler
)
public:
static void Subscribe(
EditingContext^ context,
SubscribeContextCallback<Selection^>^ handler
)
static member Subscribe :
context:EditingContext *
handler:SubscribeContextCallback<Selection> -> unit
public static function Subscribe(
context : EditingContext,
handler : SubscribeContextCallback<Selection>
)
參數
- context
型別:Microsoft.Windows.Design.EditingContext
偏好的編輯內容。
- handler
型別:Microsoft.Windows.Design.SubscribeContextCallback<Selection>
當選取範圍變更時要叫用的方法。
例外狀況
| 例外狀況 | 條件 |
|---|---|
| ArgumentNullException | context 或 handler 是 nullNull 參照 (即 Visual Basic 中的 Nothing)。 |
.NET Framework 安全性
- 完全信任立即呼叫者。這個成員無法供部分信任的程式碼使用。如需詳細資訊,請參閱從部分受信任程式碼使用程式庫。
請參閱
參考
Microsoft.Windows.Design.Interaction 命名空間