InkStrokeInput Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Provides properties and events for StrokeInput associated with an InkPresenter object.
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
- Inheritance
- Attributes
Windows requirements
Device family |
Windows 10 (introduced in 10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
|
API contract |
Windows.Foundation.UniversalApiContract (introduced in v1.0)
|
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();
}
Properties
InkPresenter |
Gets the InkPresenter object associated with the ink input data. |
Events
StrokeCanceled |
Occurs when ink input bubbles up to another system event handler, such as a context menu. |
StrokeContinued |
Occurs when stroke input has started (StrokeStarted) and continues to be captured by an InkPresenter object. |
StrokeEnded |
Occurs when stroke input has stopped being detected by an InkPresenter object. |
StrokeStarted |
Occurs when stroke input is first detected by an InkPresenter object. |
Applies to
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