Stylus.StylusOutOfRange 添付イベント
定義
スタイラスがタブレットの範囲外になると発生します。Occurs when the stylus goes out of range of the tablet.
see AddStylusOutOfRangeHandler, and RemoveStylusOutOfRangeHandler
see AddStylusOutOfRangeHandler, and RemoveStylusOutOfRangeHandler
see AddStylusOutOfRangeHandler, and RemoveStylusOutOfRangeHandler
例
次の例は、スタイラスが範囲外になったときにカーソルを矢印に変更する方法を示しています。The following example demonstrates how to change the cursor to an arrow when the stylus goes out of range. この例では、 InkCanvasが呼び出さinkCanvas1
れ、 StylusOutOfRangeイベントがイベントハンドラーに接続されていることを前提としています。This example assumes that there is an InkCanvas called inkCanvas1
and that the StylusOutOfRange event is connected to an event handler. カーソルの変更を表示するにはUseCustomCursor 、 true
プロパティをinkCanvas1
on に設定します。To see the cursor change, set the UseCustomCursor property to true
on inkCanvas1
.
void inkCanvas1_StylusOutOfRange(object sender, StylusEventArgs e)
{
inkCanvas1.Cursor = System.Windows.Input.Cursors.Arrow;
}
Private Sub inkCanvas1_StylusOutOfRange(ByVal sender As Object, ByVal e As StylusEventArgs) _
Handles inkCanvas1.StylusOutOfRange
inkCanvas1.Cursor = System.Windows.Input.Cursors.Arrow
End Sub
注釈
これは添付イベントです。This is an attached event. WPFWPF添付イベントをルーティングイベントとして実装します。implements attached events as routed events. 添付イベントとは、基本的にXAMLXAMLは、イベントを定義するのではなく、オブジェクトで処理されるイベントを参照するために使用される言語の概念です。An attached event is, fundamentally, a XAMLXAML language concept used to reference events that are handled on objects that do not, themselves, define events. WPFWPF添付イベントの機能をさらに拡張し、ルートを走査できるようにします。further expands an attached event's capabilities, allowing it to traverse a route. アタッチされたイベントには、コードで直接処理構文がありません。コードでルーティングイベントのハンドラーをアタッチするには、指定された Add * Handler メソッドを使用します。Attached events do not have a direct handling syntax in code; to attach handlers for a routed event in code, use a designated Add*Handler method. 詳細については、「添付イベントの概要」を参照してください。For details, see Attached Events Overview.
ルーティングされたイベント情報Routed Event Information
識別子フィールドIdentifier field | StylusOutOfRangeEvent |
ルーティング方法Routing strategy | バブリングBubbling |
DelegateDelegate | StylusEventHandler |