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.StrokeTypeUnspecified,则 InkAnalyzer 会在墨迹分析过程中对笔画进行分类。否则,InkAnalyzer 使用在笔画上设置的类型。

若要获取当前分配给笔画的类型,请调用 GetStrokeType()。

示例

此示例将名为 theStrokeType 的 StrokeType 值分配给与 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