Click or drag to resize
CanvasDrawingSessionDrawInk Method (IEnumerableInkStroke, Boolean)
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,
	bool highContrast
)

Parameters

inkStrokes
Type: System.Collections.GenericIEnumerableInkStroke
highContrast
Type: SystemBoolean
Remarks

This overload allows an app to use an arbitrary high-contrast accessibility option, which may be different from the one globally specified in the system environment.

To draw ink from a collection of saved strokes saved to a stream, use the GetStrokes method from its InkManager or stroke container. 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