DivisionUnit.DivisionType 属性
获取 DivisionUnit 对象的结构类型。
命名空间: Microsoft.Ink
程序集: Microsoft.Ink(在 Microsoft.Ink.dll 中)
语法
声明
Public ReadOnly Property DivisionType As InkDivisionType
用法
Dim instance As DivisionUnit
Dim value As InkDivisionType
value = instance.DivisionType
public InkDivisionType DivisionType { get; }
public:
property InkDivisionType DivisionType {
InkDivisionType get ();
}
/** @property */
public InkDivisionType get_DivisionType()
public function get DivisionType () : InkDivisionType
属性值
类型:Microsoft.Ink.InkDivisionType
DivisionUnit 对象的结构类型。默认值为 InkDivisionType。
备注
有关结构类型的更多信息,请参见 InkDivisionType 枚举。
示例
此 C# 示例创建一个 Divider 对象 theDivider,该对象包含 Strokes 集合 theStrokes,并使用 RecognizerContext 对象 theRecognizerContext。将调用 Divide 方法以获取分析结果 theResult 的快照。将调用 ResultByType 方法,调用时将 divisionType 参数设置为一个 InkDivisionType 枚举 Line,以检索 theResult 中的所有行单元。对于集合中的每一行 theLine,将检索 DivisionType、Strokes、RecognitionString 和 Transform 属性。
// Create the Divider and assign a Strokes collection to it.
Divider theDivider = new Divider(theStrokes, theRecognizerContext);
// Retrieve the analysis result, and divide the result by line.
DivisionResult theResult = theDivider.Divide();
DivisionUnits theDivisionUnits =
theResult.ResultByType(InkDivisionType.Line);
foreach (DivisionUnit theLine in theDivisionUnits)
{
// For each line element in the collection
// retrieve the division type, the strokes,
// the recognition string, and the rotation transform.
InkDivisionType theDivisionType = theLine.DivisionType;
Strokes elementStrokes = theLine.Strokes;
string theRecognitionString = theLine.RecognitionString;
System.Drawing.Drawing2D.Matrix theInkTransform =
theLine.Transform;
}
此 Microsoft(R) Visual Basic(R) .NET 示例创建一个 Divider 对象 theDivider,该对象包含 Strokes 集合 theStrokes,并使用 RecognizerContext 对象 theRecognizerContext。将调用 Divide 方法以获取分析结果 theResult 的快照。将调用 ResultByType 方法,调用时将 divisionType 参数设置为一个 InkDivisionType 枚举 Line,以检索 theResult 中的所有行单元。对于集合中的每一行 theLine,将检索 DivisionType、Strokes、RecognitionString 和 Transform 属性。
' Create the Divider and assign a Strokes collection to it.
Dim theDivider As Divider = New Divider(theStrokes, theRecognizerContext)
' Retrieve the analysis result, and divide the result by line.
Dim theResult As DivisionResult = theDivider.Divide()
Dim theDivisionUnits As DivisionUnits = _
theResult.ResultByType(InkDivisionType.Line)
Dim theLine As DivisionUnit
For Each theLine In theDivisionUnits
' For each line element in the collection
' retrieve the division type, the strokes,
' the recognition string, and the rotation transform.
Dim theDivisionType As InkDivisionType = theLine.DivisionType
Dim elementStrokes As Strokes = theLine.Strokes
Dim theRecognitionString As String = theLine.RecognitionString
Dim theInkTransform As System.Drawing.Drawing2D.Matrix = _
theLine.Transform
Next
平台
Windows Vista
.NET Framework 和 .NET Compact Framework 并不是对每个平台的所有版本都提供支持。有关支持的版本的列表,请参见.NET Framework 系统要求。
版本信息
.NET Framework
受以下版本支持:3.0