This documentation is archived and is not being maintained.

TextWordNode Class

Represents a ContextNode for a two-dimensional region where any non-ink text words may exist in the application.

Namespace: System.Windows.Ink
Assembly: IAWinFX (in iawinfx.dll)
XML Namespace:

public sealed class TextWordNode : ContextNode
public final class TextWordNode extends ContextNode
public final class TextWordNode extends ContextNode
Not applicable.

The InkAnalyzer does not produce TextWordNode objects. The application uses the CreateSubNode method to add the TextWordNode objects to the context node tree. If the state of the analyzer is persisted, these nodes can be persisted as well.

Future recognizers may use the regions defined by the TextWordNode objects to determine if any ink annotates the non-ink word.

A TextWordNode cannot have any child nodes.

The following example adds a TextWordNode object to an InkAnalyzer, theInkAnalyzer, for a TextBox control, theTextBox. It sets the Data property of the TextWordNode object to be the Text property of the TextBox.

// Add nodes to hold the TextWordNode
WritingRegionNode writingRegion = (WritingRegionNode)
ParagraphNode paragraph = (ParagraphNode)
LineNode line = (LineNode)

// Create node for the word
TextWordNode textWord = (TextWordNode)

// Set location
double textTop = InkCanvas.GetTop(theTextBox);
double textLeft = InkCanvas.GetLeft(theTextBox);

Rect rectLocation = new Rect(textLeft, textTop, theTextBox.Width, theTextBox.Height);
textWord.SetLocation(new AnalysisRegion(rectLocation));

// Set the data property to be the text in the textbox.
textWord.Data = theTextBox.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 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0