This documentation is archived and is not being maintained.

InkWordNode Class

Represents a ContextNode for a collection of strokes that make up a logical grouping to form a recognizable word.

Namespace:  Microsoft.Ink
Assembly:  Microsoft.Ink.Analysis (in Microsoft.Ink.Analysis.dll)

public sealed class InkWordNode : ContextNode

An InkWordNode object cannot contain any children.

The following example loops through all InkWordNode objects from an InkAnalyzer, theInkAnalyzer, and then draws lines that show the rotated bounding rectangle, the ascender, the descender, the midline, and the baseline. The lines are drawn on a Panel, theNotesPanel.

			Graphics panelGraphics = theNotesPanel.CreateGraphics();
			Renderer theRenderer = theInkCollector.Renderer;

			// Loop through all of the ink words
			ContextNodeCollection inkWords =
			foreach (InkWordNode inkWord in inkWords)
				// Show rotated bounding box in blue 
				// Convert corners to pixel coordinates
				Point[] corners = inkWord.GetRotatedBoundingBox();
                theRenderer.InkSpaceToPixel(panelGraphics, ref corners);
				// Draw the rectangle
				panelGraphics.DrawPolygon(new Pen(Color.Blue), corners);

				// Show the ascender line in green
				Point[] ascenderPoints = inkWord.GetAscender();
				// Convert to pixel coordinates
                theRenderer.InkSpaceToPixel(panelGraphics, ref ascenderPoints);
				panelGraphics.DrawLines(new Pen(Color.Green), ascenderPoints);

				// Show the baseline in purple
				Point[] basePoints = inkWord.GetBaseline();
				// Convert to pixel coordinates
                theRenderer.InkSpaceToPixel(panelGraphics, ref basePoints);
				panelGraphics.DrawLines(new Pen(Color.Purple), basePoints);

				// Show the descender line in yellow
				Point[] descenderPoints = inkWord.GetDescender();
				// Convert to pixel coordinates
                theRenderer.InkSpaceToPixel(panelGraphics, ref descenderPoints);
				panelGraphics.DrawLines(new Pen(Color.Yellow), descenderPoints);

				// Show the mid line in brown
				Point[] midlinePoints = inkWord.GetMidline();
				// Convert to pixel coordinates
                theRenderer.InkSpaceToPixel(panelGraphics, ref midlinePoints);
				panelGraphics.DrawLines(new Pen(Color.Brown), midlinePoints);


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 Server 2008 R2, Windows Server 2008

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