Share via


InkOverlay.CollectingInk Property

Gets a value that specifies whether ink is currently being drawn on an InkOverlay object.

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

Syntax

'Declaration
Public ReadOnly Property CollectingInk As Boolean
'Usage
Dim instance As InkOverlay
Dim value As Boolean

value = instance.CollectingInk
public bool CollectingInk { get; }
public:
property bool CollectingInk {
    bool get ();
}
/** @property */
public boolean get_CollectingInk ()
public function get CollectingInk () : boolean
Not applicable.

Property Value

A value that specifies whether ink is currently being drawn on an InkOverlay object. true if ink is being drawn on the InkOverlay object; otherwise, false.

Remarks

You can use the CollectingInk property to see if ink is being drawn on an InkOverlay object rather than monitoring the Stroke event.

Note

Because ink collection is happening on a different thread than your application code, it is possible that the CollectingInk property can change soon after you have checked it. Thus, your code may be operating under the assumption that the InkOverlay is not collecting ink, when in fact it is. If this occurs, an error is thrown. To be safe, put such code in a try-catch block.

Example

This C# example gets the value that indicates whether ink is being drawn on an InkOverlay.

bool isCollecting = theInkOverlay.CollectingInk;

This Microsoft Visual Basic .NET example gets the value that indicates whether ink is being drawn on an InkOverlay.

Dim isCollecting As Boolean = theInkOverlay.CollectingInk

Platforms

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

Version Information

.NET Framework

Supported in: 3.0

See Also

Reference

InkOverlay Class
InkOverlay Members
Microsoft.Ink Namespace
InkOverlay.Stroke