InkCollector.CollectingInk Property
InkCollector.CollectingInk Property |
Gets a value that specifies whether ink is currently being drawn on an InkCollector object.
Definition
Visual Basic .NET Public ReadOnly Property CollectingInk As Boolean C# public bool CollectingInk { get; } Managed C++ public: __property bool* get_CollectingInk();
Property Value
System.Boolean. A value that specifies whether ink is currently being drawn on an InkCollector object.
This property is read-only. This property has no default value.
true
Ink is being drawn on the InkCollector object. false
Ink is not being drawn on the InkCollector object.
Exceptions
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 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 InkCollector 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.
Examples
[C#]
This C# example gets the value that indicates whether ink is being drawn on an InkCollector.
bool isCollecting = theInkCollector.CollectingInk;
[VB.NET]
This Microsoft® Visual Basic® .NET example gets the value that indicates whether ink is being drawn on an InkCollector.
Dim isCollecting As Boolean = theInkCollector.CollectingInk
See Also