InkAnalyzer.FindInkLeafNodes 方法 (StrokeCollection)

返回一个 ContextNodeCollection,其中包含的墨迹叶节点包含某些指定的笔画。

命名空间:  System.Windows.Ink
程序集:  IAWinFX(在 IAWinFX.dll 中)

语法

声明
Public Function FindInkLeafNodes ( _
    strokes As StrokeCollection _
) As ContextNodeCollection
用法
Dim instance As InkAnalyzer
Dim strokes As StrokeCollection
Dim returnValue As ContextNodeCollection

returnValue = instance.FindInkLeafNodes(strokes)
public ContextNodeCollection FindInkLeafNodes(
    StrokeCollection strokes
)
public:
ContextNodeCollection^ FindInkLeafNodes(
    StrokeCollection^ strokes
)
public ContextNodeCollection FindInkLeafNodes(
    StrokeCollection strokes
)
public function FindInkLeafNodes(
    strokes : StrokeCollection
) : ContextNodeCollection

参数

返回值

类型:System.Windows.Ink.ContextNodeCollection
包含指定笔画的墨迹叶节点。

备注

墨迹叶节点示例包括 InkWordNodeInkDrawingNodeInkBulletNode

叶节点不包含子节点。

如果 strokes 为 nullnull 引用(在 Visual Basic 中为 Nothing),则引发异常。如果无任何节点包含笔画,则返回空 ContextNodeCollection。同样,如果传入空 StrokeCollection 集合,则返回空 ContextNodeCollection

示例

下面的示例调用 FindInkLeafNodes,以在 InkAnalyzer(名为 theInkAnalyzer)中查找包含与 StrokeCollection (selectedStrokes) 中的笔画相匹配的笔画的墨迹叶节点。然后将匹配的笔画的颜色更改为红色。

For Each node As ContextNode In theInkAnalyzer.FindInkLeafNodes(selectedStrokes)
    For Each Stroke As Stroke In node.Strokes
        Stroke.DrawingAttributes.Color = Colors.Red
    Next Stroke
Next node
foreach (ContextNode node in theInkAnalyzer.FindInkLeafNodes(selectedStrokes))
{
    foreach (Stroke stroke in node.Strokes)
    {
        stroke.DrawingAttributes.Color = Colors.Red;
    }
}

平台

Windows Vista

.NET Framework 和 .NET Compact Framework 并不是对每个平台的所有版本都提供支持。有关支持的版本的列表,请参见.NET Framework 系统要求

版本信息

.NET Framework

受以下版本支持:3.0

另请参见

参考

InkAnalyzer 类

InkAnalyzer 成员

FindInkLeafNodes 重载

System.Windows.Ink 命名空间

InkAnalyzer.FindLeafNodes

InkAnalyzer.FindNode

InkAnalyzer.FindNodes

InkAnalyzer.FindNodesOfType