InkStrokeInput InkStrokeInput InkStrokeInput InkStrokeInput Class


Provides properties and events for StrokeInput associated with an InkPresenter object.

public : sealed class InkStrokeInput : IInkStrokeInput
struct winrt::Windows::UI::Input::Inking::InkStrokeInput : IInkStrokeInput
public sealed class InkStrokeInput : IInkStrokeInput
Public NotInheritable Class InkStrokeInput Implements IInkStrokeInput
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)


Here, we declare a StrokeStarted listener.

inkCanvas.InkPresenter.StrokeInput.StrokeStarted += StrokeInput_StrokeStarted;

We then define the corresponding handler, which clears any selected strokes when a new ink stroke is started.

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;


InkPresenter InkPresenter InkPresenter InkPresenter

Gets the InkPresenter object associated with the ink input data.


StrokeCanceled StrokeCanceled StrokeCanceled StrokeCanceled

Occurs when ink input bubbles up to another system event handler, such as a context menu.

StrokeContinued StrokeContinued StrokeContinued StrokeContinued

Occurs when stroke input has started (StrokeStarted ) and continues to be captured by an InkPresenter object.

StrokeEnded StrokeEnded StrokeEnded StrokeEnded

Occurs when stroke input has stopped being detected by an InkPresenter object.

StrokeStarted StrokeStarted StrokeStarted StrokeStarted

Occurs when stroke input is first detected by an InkPresenter object.

See Also