Share via


InkCollector.CollectingInk Property

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

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

Syntax

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

value = instance.CollectingInk
public bool CollectingInk { get; }
public:
property bool CollectingInk {
    bool get ();
}
public function get CollectingInk () : boolean

Property Value

Type: System.Boolean
A value that specifies whether ink is currently being drawn on an InkCollector object.
true if Ink is being drawn on the InkCollector object; otherwise, false.

Remarks

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

Note

Because ink collection is handled on a separate thread from your application code, the CollectingInk property can change to true while your application code is operating under the assumption that it is still false. To handle this contingency, code that depends upon the value of the CollectingInk property should be contained within a try-catch block.

Examples

In this example, the CollectingInk property is checked to see if it is safe to perform operations that can only be carried out when ink is not being collected.

Try 
    If Not mInkCollector.CollectingInk Then 
        ' do something 
    End If 
Catch 
    ' handle or rethrow 
End Try
try
{
    if (!mInkCollector.CollectingInk)
    {
        // do something
    }
}
catch
{
    // handle or rethrow
}

Platforms

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.

Version Information

.NET Framework

Supported in: 3.0

See Also

Reference

InkCollector Class

InkCollector Members

Microsoft.Ink Namespace

InkCollector.Stroke