This documentation is archived and is not being maintained.
ContextNodeTypeBase Class
Visual Studio 2008
Defines values that specify the type of ContextNode object.
Assembly: IACore (in IACore.dll)
The ContextNodeBase.Type property and the InkAnalyzerBase.FindNodesOfType method frequently use the fields of this class.
This example sets the Text property of a TextBox, selectedResultsTextBox, to show an appropriate string for a ContextNodeBase, selectedNode. It uses the Type property to choose the kind of text to show, depending on the type of the ContextNodeBase.
If (selectedNode.ContainsPropertyData(PropertyGuidsForContextNodesBase.RecognizedString) AndAlso _ (selectedNode.Type = System.Windows.Ink.AnalysisCore.ContextNodeTypeBase.WritingRegion OrElse _ selectedNode.Type = System.Windows.Ink.AnalysisCore.ContextNodeTypeBase.Paragraph OrElse _ selectedNode.Type = System.Windows.Ink.AnalysisCore.ContextNodeTypeBase.CustomRecognizer OrElse _ selectedNode.Type = System.Windows.Ink.AnalysisCore.ContextNodeTypeBase.Object OrElse _ selectedNode.Type = System.Windows.Ink.AnalysisCore.ContextNodeTypeBase.Line)) Then selectedResultsTextBox.Text = _ CType(selectedNode.GetPropertyData(PropertyGuidsForContextNodesBase.RecognizedString), String) ElseIf (selectedNode.Type = System.Windows.Ink.AnalysisCore.ContextNodeTypeBase.InkWord) Then Dim parentNode As ContextNodeBase = selectedNode.ParentNode If (parentNode.Type = System.Windows.Ink.AnalysisCore.ContextNodeTypeBase.Line AndAlso _ parentNode.ContainsPropertyData(PropertyGuidsForContextNodesBase.RecognizedString)) Then ' Put parent line's recognized string into the text box selectedResultsTextBox.Text = _ CType(parentNode.GetPropertyData(PropertyGuidsForContextNodesBase.RecognizedString), String) ' Select the text that corresponds to the ink word Dim subNodes As New ContextNodeBaseCollection(theInkAnalyzerBase) subNodes.Add(selectedNode) Dim start As Integer Dim length As Integer theInkAnalyzerBase.GetTextRangeFromNodes(subNodes, start, length) If (start >= 0 AndAlso length > 0) Then selectedResultsTextBox.Select(start, length) End If End If ElseIf (selectedNode.Type = System.Windows.Ink.AnalysisCore.ContextNodeTypeBase.InkDrawing AndAlso _ selectedNode.ContainsPropertyData(PropertyGuidsForContextNodesBase.ShapeName)) Then selectedResultsTextBox.Text = _ CType(selectedNode.GetPropertyData(PropertyGuidsForContextNodesBase.ShapeName), String) End If
Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: