TouchDevice.OnCapture(IInputElement, CaptureMode) 方法

定義

當擷取到對項目的觸控時呼叫。Called when a touch is captured to an element.

protected:
 virtual void OnCapture(System::Windows::IInputElement ^ element, System::Windows::Input::CaptureMode captureMode);
protected virtual void OnCapture (System.Windows.IInputElement element, System.Windows.Input.CaptureMode captureMode);
abstract member OnCapture : System.Windows.IInputElement * System.Windows.Input.CaptureMode -> unit
override this.OnCapture : System.Windows.IInputElement * System.Windows.Input.CaptureMode -> unit
Protected Overridable Sub OnCapture (element As IInputElement, captureMode As CaptureMode)

參數

element
IInputElement

用於擷取觸控輸入的項目。The element that captures the touch input.

captureMode
CaptureMode

擷取原則。The capture policy.

備註

OnCapture方法沒有預設的實值。The OnCapture method has no default implementation. 您可以在衍生類別中覆寫它,以便在捕捉到觸控輸入時執行所需的任何動作。It can be overridden in a derived class to perform any actions that are required when the touch input is captured.

適用於