Freigeben über


InkPicture.CollectingInk Property

Gets a value that specifies whether ink is currently being drawn on an InkPicture control.

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

Syntax

'Declaration
Public ReadOnly Property CollectingInk As Boolean
'Usage
Dim instance As InkPicture
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 InkPicture control.

Value

Meaning

true

Ink is being drawn on the InkPicture control.

false

Ink is not being drawn on the InkPicture control.

Remarks

You can use the CollectingInk property to see if ink is being drawn on an InkPicture control 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 InkPicture 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 returns the CollectingInk value of an InkPicture, theInkPicture, as a Boolean, isCollecting.

[C#]

bool isCollecting = theInkPicture.CollectingInk;

This Microsoft® Visual Basic® .NET example returns the CollectingInk value of an InkPicture, theInkPicture, as a Boolean, isCollecting.

[Visual Basic]

Dim isCollecting As Boolean = theInkPicture.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

InkPicture Class
InkPicture Members
Microsoft.Ink Namespace
InkPicture.Stroke