共用方式為


InkAnalyzer.SetStrokeType 方法

變更 Stroke 的筆劃型別。

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

語法

'宣告
Public Sub SetStrokeType ( _
    stroke As Stroke, _
    strokeType As StrokeType _
)
'用途
Dim instance As InkAnalyzer
Dim stroke As Stroke
Dim strokeType As StrokeType

instance.SetStrokeType(stroke, strokeType)
public void SetStrokeType(
    Stroke stroke,
    StrokeType strokeType
)
public:
void SetStrokeType(
    Stroke^ stroke, 
    StrokeType strokeType
)
public void SetStrokeType(
    Stroke stroke,
    StrokeType strokeType
)
public function SetStrokeType(
    stroke : Stroke, 
    strokeType : StrokeType
)

參數

備註

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

若要取得目前指派給筆劃的型別,請呼叫 GetStrokeType()。

範例

這個範例會指派 StrokeType 值 (名為 theStrokeType) 給與 InkAnalyzer (名為 theInkAnalyzer) 相關聯之 ContextNode (名為 theContextNode) 中的每個筆劃。

' Iterate through the strokes within the context node and update
' the stroke type of those strokes.
Dim theStroke As Stroke
For Each theStroke In theContextNode.Strokes
    theInkAnalyzer.SetStrokeType(theStroke, theStrokeType)
Next theStroke
// Iterate through the strokes within the context node and update
// the stroke type of those strokes.
foreach (Stroke theStroke in theContextNode.Strokes)
{
    theInkAnalyzer.SetStrokeType(theStroke, theStrokeType);
}

平台

Windows Vista

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

版本資訊

.NET Framework

支援版本:3.0

請參閱

參考

InkAnalyzer 類別

InkAnalyzer 成員

System.Windows.Ink 命名空間

System.Windows.Ink.StrokeType