Skip to content

Latest commit

 

History

History
47 lines (33 loc) · 2.64 KB

inkpresenter_strokeinput.md

File metadata and controls

47 lines (33 loc) · 2.64 KB
-api-id -api-type -api-device-family-note
P:Windows.UI.Input.Inking.InkPresenter.StrokeInput
winrt property
xbox

Windows.UI.Input.Inking.InkPresenter.StrokeInput

-description

Gets an InkStrokeInput object for managing ink input events.

-property-value

The ink input.

-remarks

-examples

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;
  }
  ClearDrawnBoundingRect();
}

-see-also

Pen and stylus interactions, Get started: Support ink in your UWP app, Ink analysis sample (basic) (C#), Ink handwriting recognition sample (C#), Save and load ink strokes from an Ink Serialized Format (ISF) file, Save and load ink strokes from the clipboard, Ink toolbar location and orientation sample (basic), Ink toolbar location and orientation sample (dynamic), Coloring book sample, Family notes sample, Inking sample (JavaScript), Simple inking sample (C#/C++), Complex inking sample (C++), Ink analysis sample