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
<PermissionSetAttribute(SecurityAction.InheritanceDemand, Name := "FullTrust")> _
Public Class Divider _
Implements IDisposable
'Usage
Dim instance As Divider
[PermissionSetAttribute(SecurityAction.InheritanceDemand, Name = "FullTrust")]
public class Divider : IDisposable
[PermissionSetAttribute(SecurityAction::InheritanceDemand, Name = L"FullTrust")]
public ref class Divider : IDisposable
public class Divider implements IDisposable
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 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