InkAnalyzer.FindNodesOfType 方法 (Guid, StrokeCollection)

返回一个 ContextNodeCollection,其中包含具有指定类型(即指定 StrokeCollection 中的笔画)的 ContextNode 对象。

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

语法

声明
Public Function FindNodesOfType ( _
    type As Guid, _
    strokes As StrokeCollection _
) As ContextNodeCollection
用法
Dim instance As InkAnalyzer
Dim type As Guid
Dim strokes As StrokeCollection
Dim returnValue As ContextNodeCollection

returnValue = instance.FindNodesOfType(type, _
    strokes)
public ContextNodeCollection FindNodesOfType(
    Guid type,
    StrokeCollection strokes
)
public:
ContextNodeCollection^ FindNodesOfType(
    Guid type, 
    StrokeCollection^ strokes
)
public ContextNodeCollection FindNodesOfType(
    Guid type,
    StrokeCollection strokes
)
public function FindNodesOfType(
    type : Guid, 
    strokes : StrokeCollection
) : ContextNodeCollection

参数

返回值

类型:System.Windows.Ink.ContextNodeCollection
一个 ContextNodeCollection,其中包含具有用于存储 strokes collection 中笔画的类型的 ContextNode 对象。

备注

如果某个节点或其某个后代引用属于该笔画集合的笔画,则此方法在返回值中包含该节点。

示例

下面的示例查找包含 StrokeCollection (selectedStrokes) 中的任意笔画的 LineNode 对象,并将这些对象标记为红色。

Dim selectedLines As ContextNodeCollection = theInkAnalyzer.FindNodesOfType(ContextNodeType.Line, selectedStrokes)
Dim line As LineNode
For Each line In  selectedLines
    Dim stroke As Stroke
    For Each stroke In  line.Strokes
        stroke.DrawingAttributes.Color = Colors.Red
    Next stroke
Next line
ContextNodeCollection selectedLines =
    theInkAnalyzer.FindNodesOfType(ContextNodeType.Line,
    selectedStrokes);
foreach (LineNode line in selectedLines)
{
    foreach (Stroke stroke in line.Strokes)
        stroke.DrawingAttributes.Color = Colors.Red;
}

平台

Windows Vista

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

版本信息

.NET Framework

受以下版本支持:3.0

另请参见

参考

InkAnalyzer 类

InkAnalyzer 成员

FindNodesOfType 重载

System.Windows.Ink 命名空间

InkAnalyzer.FindInkLeafNodes

InkAnalyzer.FindLeafNodes

InkAnalyzer.FindNode

InkAnalyzer.FindNodes