Share via


InkStrokeInput クラス

定義

InkPresenter オブジェクトに関連付けられた StrokeInput のプロパティとイベントを提供します。

public ref class InkStrokeInput sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class InkStrokeInput final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class InkStrokeInput
Public NotInheritable Class InkStrokeInput
継承
Object Platform::Object IInspectable InkStrokeInput
属性

Windows の要件

デバイス ファミリ
Windows 10 (10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox で導入)
API contract
Windows.Foundation.UniversalApiContract (v1.0 で導入)

ここでは、 StrokeStarted リスナーを宣言します。

inkCanvas.InkPresenter.StrokeInput.StrokeStarted += StrokeInput_StrokeStarted;

次に、対応するハンドラーを定義します。これにより、新しいインク ストロークが開始されたときに選択したストロークがクリアされます。

private void StrokeInput_StrokeStarted(InkStrokeInput sender, Windows.UI.Core.PointerEventArgs args)
{
  var strokes = inkCanvas.InkPresenter.StrokeContainer.GetStrokes();
  foreach (var stroke in strokes)
  {
    stroke.Selected = false;
  }
  ClearDrawnBoundingRect();
}

プロパティ

InkPresenter

インク入力データに関連付けられている InkPresenter オブジェクトを取得します。

イベント

StrokeCanceled

インク入力がコンテキスト メニューなどの別のシステム イベント ハンドラーにバブルアップしたときに発生します。

StrokeContinued

ストローク入力が開始され (StrokeStarted)、 InkPresenter オブジェクトによって引き続きキャプチャされるときに発生します。

StrokeEnded

InkPresenter オブジェクトによってストローク入力が検出されなくなったときに発生します。

StrokeStarted

InkPresenter オブジェクトによってストローク入力が最初に検出されたときに発生します。

適用対象

こちらもご覧ください