Click or drag to resize
CanvasDrawingSessionDrawInk Method (IEnumerableInkStroke)
Draws a collection of ink strokes.

Namespace:  Microsoft.Graphics.Canvas
Assembly:  Microsoft.Graphics.Canvas (in Microsoft.Graphics.Canvas.dll) Version: 0.0.0.0
Syntax
C#
public void DrawInk(
	IEnumerable<InkStroke> inkStrokes
)

Parameters

inkStrokes
Type: System.Collections.GenericIEnumerableInkStroke
Remarks

This overload reads the high-contrast accessiblity option from the system environment.

To draw ink from a collection of saved strokes saved to a stream, use the collection's GetStrokes method. For example:

await inkManager.LoadAsync(inputStream);

using (CanvasDrawingSession ds = canvasRenderTarget.CreateDrawingSession())
{
    ds.DrawInk(inkManager.GetStrokes());
}

To draw ink from an InkCanvas using custom drying, use BeginDry from the InkSynchronizer object. For example:

InkSynchronizer inkSynchronizer = inkCanvas.InkPresenter.ActivateCustomDrying();

using (CanvasDrawingSession ds = canvasRenderTarget.CreateDrawingSession())
{
    var strokes = inkSynchronizer.BeginDry();
    ds.DrawInk(strokes);
    inkSynchronizer.EndDry();
}

See Also