Divider Class
Represents the ability to analyze the layout of a collection of strokes, dividing them into text and graphics.
Namespace: Microsoft.Ink
Assembly: Microsoft.Ink (in microsoft.ink.dll)
Syntax
'Declaration
Public Class Divider
Implements IDisposable
'Usage
Dim instance As Divider
public class Divider : IDisposable
public ref class Divider : IDisposable
public class Divider implements IDisposable
public class Divider implements IDisposable
Not applicable.
Remarks
Warning
Because tis object maintains non-managed resources, you must explicitly call the Dispose method on instances of the Microsoft.Ink.Divider class that are no longer in use before they go out of scope. Otherwise, memory leaks and exceptions may result.
For an example of disposing managed objects, see Using the Managed Library.
The Divider object uses the layout of the strokes, the order in which they are added, the direction in which they are drawn and other factors to analyze the ink. The Strokes collection is contained in the Strokes property of Divider. The Divider object dynamically analyzes the Strokes collection as you add to or delete from it.
The analysis results are returned by the DivisionResult object.
The Divider object uses a RecognizerContext object to more accurately divide the strokes and to assign a recognition string to results.
Note
The Divider object uses the default property settings of the RecognizerContext object.
If you do not assign a recognizer context to the Divider object, the Divider object analyzes the ink, but it divides the strokes less accurately and does not associate text with division results.
Note
The RecognizerContext property should be set before adding strokes to the Strokes property. After strokes have been added to the Divider object, the RecognizerContext property cannot be changed.
The Divider does not currently support vertical languages. For the Divider object to properly recognize these languages, the Recognizer object for the language must support free input. Also, characters must be written from left to right.
Note
The Divider object's Dispose method does not release the resources of the attached RecognizerContext object and Strokes collection. If the Divider object maintains the only reference, your application should dispose of the RecognizerContext object and Strokes collection associated with the Divider object prior to disposing of the Divider object.
The managed version of the Divider object wraps the COM InkDivider Class. The Divider object's constructor, Divide method, LineHeight method, RecognizerContext method, and Strokes method will all throw a Marshal.ThrowExceptionForHR exception if the COM InkDivider returns an error. See the individual reference topics for members of the COM InkDivider Class for details on the errors that can be returned.
Inheritance Hierarchy
System.Object
Microsoft.Ink.Divider
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
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
Divider Members
Microsoft.Ink Namespace
DivisionResult
RecognizerContext
Strokes