This documentation is archived and is not being maintained.

Ink Class

Represents the collected strokes of ink within an ink space.

Namespace:  Microsoft.Ink
Assembly:  Microsoft.Ink (in Microsoft.Ink.dll)

[PermissionSetAttribute(SecurityAction.InheritanceDemand, Name = "FullTrust")]
public class Ink : ICloneable, IDisposable

Caution noteCaution:

To avoid a memory leak, you must explicitly call the Dispose method on any Ink object to which an event handler has been attached before the object goes out of scope.

An Ink object is a container of stroke (point) data. The stroke data, or the points collected by the pen, are put into an Ink object. The Strokes property contains the data for all strokes within the Ink object.

The InkCollector object, InkOverlay object, InkPicture control, and InkEdit control collect points from the input device and put them into an Ink object. These objects essentially act as the source that distributes ink into one or many different Ink objects, which act as containers that hold the distributed ink.

The ink space is a virtual coordinate space to which the coordinates of the tablet context are mapped. This space is fixed to a HIMETRIC coordinate system. In ink space coordinates, a move from 0 to 1 equals 1 HIMETRIC unit. This mapping makes it easy to relate multiple Ink objects.

The Renderer object manages the mappings between ink and the display window.


The first instantiation of this object causes GDI+ to be instantiated as well. A side-effect is that if you are using a single ink object in a loop and create and destroy it within the loop, you will cause GDI+ to be instantiated over and over. This can cause performance degradation in your application. To prevent this, keep a single instance of an Ink object at all times while your application is using ink.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 7, Windows Vista, Windows Server 2008 R2, Windows Server 2008

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.0