InkAnalyzer.RootNode - свойство
Обновлен: Ноябрь 2007
Gets the root ContextNode of the InkAnalyzer.
Пространство имен: Microsoft.Ink
Сборка: Microsoft.Ink.Analysis (в Microsoft.Ink.Analysis.dll)
Синтаксис
'Декларация
Public ReadOnly Property RootNode As ContextNode
'Применение
Dim instance As InkAnalyzer
Dim value As ContextNode
value = instance.RootNode
public ContextNode RootNode { get; }
public:
property ContextNode^ RootNode {
ContextNode^ get ();
}
/** @property */
public ContextNode get_RootNode()
public function get RootNode () : ContextNode
Значение свойства
Тип: Microsoft.Ink.ContextNode
The root ContextNode of the InkAnalyzer.
Заметки
The InkAnalyzer maintains a tree of ContextNode objects. These objects contain both input for analysis and the results of analysis. When strokes are initially added to the InkAnalyzer, the InkAnalyzer assigns them to an UnclassifiedInkNode. After the strokes are analyzed, the InkAnalyzer assigns them to appropriate ContextNode objects in the tree.
Примеры
This example calls a helper method, CheckTreeNodes, to check all of the ContextNode objects currently maintained by the InkAnalyzer, theInkAnalyzer.
' Use a helper function to check all the ContextNode objects in
' the analyzer's tree.
CheckTreeNodes(Me.theInkAnalyzer.RootNode)
// Use a helper function to check all the ContextNode objects in
// the analyzer's tree.
CheckTreeNodes(this.theInkAnalyzer.RootNode);
In this example, CheckTreeNodes then sends information about each node encountered to the debug output. The helper method, GetContextNodeTypeName, is not shown.
''' <summary>
''' Checks the specified ContextNode and all of its descendents.
''' </summary>
''' <param name="theContextNode">The node at which to start.</param>
''' <remarks>
''' This method writes the name of the type of each node encountered
''' to the debug output.
''' </remarks>
Private Shared Sub CheckTreeNodes(ByVal theContextNode As Microsoft.Ink.ContextNode)
' Check the node...
System.Diagnostics.Debug.WriteLine(GetContextNodeTypeName(theContextNode.Type))
System.Diagnostics.Debug.Indent()
' Check the child nodes.
Dim theContextSubnode As Microsoft.Ink.ContextNode
For Each theContextSubnode In theContextNode.SubNodes
CheckTreeNodes(theContextSubnode)
Next theContextSubnode
System.Diagnostics.Debug.Unindent()
End Sub 'CheckTreeNodes
/// <summary>
/// Checks the specified ContextNode and all of its descendents.
/// </summary>
/// <param name="theContextNode">The node at which to start.</param>
/// <remarks>
/// This method writes the name of the type of each node encountered
/// to the debug output.
/// </remarks>
private static void CheckTreeNodes(Microsoft.Ink.ContextNode theContextNode)
{
// Check the node...
System.Diagnostics.Debug.WriteLine(
GetContextNodeTypeName(theContextNode.Type));
System.Diagnostics.Debug.Indent();
// Check the child nodes.
foreach (Microsoft.Ink.ContextNode theContextSubnode
in theContextNode.SubNodes)
{
CheckTreeNodes(theContextSubnode);
}
System.Diagnostics.Debug.Unindent();
}
Платформы
Windows Vista
Среды .NET Framework и .NET Compact Framework поддерживают не все версии каждой платформы. Поддерживаемые версии перечислены в разделе Требования к системе для .NET Framework.
Сведения о версии
.NET Framework
Поддерживается в версии: 3.0