共用方式為


InkAnalyzer.GetStrokeType 方法

傳回 Stroke 的型別。

命名空間:  System.Windows.Ink
組件:  IAWinFX (在 IAWinFX.dll 中)

語法

'宣告
Public Function GetStrokeType ( _
    stroke As Stroke _
) As StrokeType
'用途
Dim instance As InkAnalyzer
Dim stroke As Stroke
Dim returnValue As StrokeType

returnValue = instance.GetStrokeType(stroke)
public StrokeType GetStrokeType(
    Stroke stroke
)
public:
StrokeType GetStrokeType(
    Stroke^ stroke
)
public StrokeType GetStrokeType(
    Stroke stroke
)
public function GetStrokeType(
    stroke : Stroke
) : StrokeType

參數

傳回值

型別:System.Windows.Ink.StrokeType
stroke 的分類。

備註

如果筆劃的型別為 System.Windows.Ink.StrokeTypeUnspecified,則 InkAnalyzer 會在筆墨分析期間分類筆劃。否則,InkAnalyzer 會使用筆劃上設定的型別。

若要指定或變更筆劃型別,請使用 SetStrokeType() 或 SetStrokesType()。

範例

這個範例會定義 GetStrokeTypesInNode 方法,以傳回 ContextNode 中的所有筆劃型別。

' Iterate through the strokes within the context node and add the
' stroke types to a collection.
Dim theStrokeTypes As New System.Collections.ArrayList()
Dim theStroke As Stroke
For Each theStroke In theContextNode.Strokes
    Dim theStrokeType As StrokeType = theInkAnalyzer.GetStrokeType(theStroke)
    If Not theStrokeTypes.Contains(theStrokeType) Then
        theStrokeTypes.Add(theStrokeType)
    End If
Next theStroke
// Iterate through the strokes within the context node and add the
// stroke types to a collection.
System.Collections.ArrayList theStrokeTypes =
    new System.Collections.ArrayList();
foreach (Stroke theStroke in theContextNode.Strokes)
{
    StrokeType theStrokeType =
        theInkAnalyzer.GetStrokeType(theStroke);
    if (!theStrokeTypes.Contains(theStrokeType))
    {
        theStrokeTypes.Add(theStrokeType);
    }
}

平台

Windows Vista

.NET Framework 和 .NET Compact Framework 並不支援各種平台的所有版本。如需支援平台版本的相關資訊,請參閱 .NET Framework 系統需求

版本資訊

.NET Framework

支援版本:3.0

請參閱

參考

InkAnalyzer 類別

InkAnalyzer 成員

System.Windows.Ink 命名空間

System.Windows.Ink.StrokeType