Share via


InkPresenter.StrokeInput Property

Definition

Gets an InkStrokeInput object for managing ink input events.

public:
 property InkStrokeInput ^ StrokeInput { InkStrokeInput ^ get(); };
InkStrokeInput StrokeInput();
public InkStrokeInput StrokeInput { get; }
var inkStrokeInput = inkPresenter.strokeInput;
Public ReadOnly Property StrokeInput As InkStrokeInput

Property Value

The ink input.

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

Applies to

See also