傳回包含所指定型別之 ContextNode 物件的 ContextNodeCollection,這些物件也就是指定之 StrokeCollection 中的筆劃。
命名空間: 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
參數
- type
型別:System.Guid
- strokes
型別:System.Windows.Ink.StrokeCollection
傳回值
型別:System.Windows.Ink.ContextNodeCollection
用來將筆劃儲存在 strokes collection 中的 ContextNodeCollection,其中包含指定之型別的 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