ContextNodeTypeBase Class
Collapse the table of content
Expand the table of content

ContextNodeTypeBase Class

Defines values that specify the type of ContextNode object.

Namespace:  System.Windows.Ink.AnalysisCore
Assembly:  IACore (in IACore.dll)

public sealed class ContextNodeTypeBase

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) &&
   (selectedNode.Type == System.Windows.Ink.AnalysisCore.ContextNodeTypeBase.WritingRegion ||
    selectedNode.Type == System.Windows.Ink.AnalysisCore.ContextNodeTypeBase.Paragraph ||
    selectedNode.Type == System.Windows.Ink.AnalysisCore.ContextNodeTypeBase.CustomRecognizer ||
    selectedNode.Type == System.Windows.Ink.AnalysisCore.ContextNodeTypeBase.Object ||
    selectedNode.Type == System.Windows.Ink.AnalysisCore.ContextNodeTypeBase.Line))
    selectedResultsTextBox.Text =
else if (selectedNode.Type == System.Windows.Ink.AnalysisCore.ContextNodeTypeBase.InkWord)
    ContextNodeBase parentNode = selectedNode.ParentNode;
    if (parentNode.Type == System.Windows.Ink.AnalysisCore.ContextNodeTypeBase.Line &&
        // Put parent line's recognized string into the text box
        selectedResultsTextBox.Text =

        // Select the text that corresponds to the ink word
        ContextNodeBaseCollection subNodes = new ContextNodeBaseCollection(theInkAnalyzerBase);
        int start;
        int length;
        theInkAnalyzerBase.GetTextRangeFromNodes(subNodes, out start, out length);
        if (start >= 0 && length > 0)
            selectedResultsTextBox.Select(start, length);
else if (selectedNode.Type == System.Windows.Ink.AnalysisCore.ContextNodeTypeBase.InkDrawing &&
    selectedResultsTextBox.Text =



Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

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.

.NET Framework

Supported in: 3.0

Community Additions

© 2015 Microsoft