InkWordNode Class
Represents a ContextNode for a collection of strokes that make up a logical grouping that forms a recognizable word.
Namespace: System.Windows.Ink
Assembly: IAWinFX (in IAWinFX.dll)
Syntax
'Declaration
Public NotInheritable Class InkWordNode _
Inherits ContextNode
'Usage
Dim instance As InkWordNode
public sealed class InkWordNode : ContextNode
public ref class InkWordNode sealed : public ContextNode
public final class InkWordNode extends ContextNode
Remarks
An InkWordNode object cannot contain any children.
Examples
The following example loops through all InkWordNode objects from an InkAnalyzer, theInkAnalyzer, and then draws lines that show the rotated bounding rectangle, the ascender line, ascenderLine, the descender line, descenderLine, the midline, and the baseline. The lines are drawn on an InkCanvas, theInkCanvas.
' Loop through all of the ink words
Dim inkWords As ContextNodeCollection = _
theInkAnalyzer.FindNodesOfType(ContextNodeType.InkWord)
Dim inkWord As InkWordNode
For Each inkWord In inkWords
' Show rotated bounding box in blue
Dim rotatedBounds As New Polygon()
rotatedBounds.Points = inkWord.GetRotatedBoundingBox()
rotatedBounds.Stroke = Brushes.Blue
Me.theInkCanvas.Children.Add(rotatedBounds)
' Show the ascender line in green
Dim ascenderLine As New Polyline()
ascenderLine.Points = inkWord.GetAscender()
ascenderLine.Stroke = Brushes.Green
Me.theInkCanvas.Children.Add(ascenderLine)
' Show the baseline in purple
Dim baseline As New Polyline()
baseline.Points = inkWord.GetBaseline()
baseline.Stroke = Brushes.Purple
theInkCanvas.Children.Add(baseline)
' Show the descender line in yellow
Dim descenderLine As New Polyline()
descenderLine.Points = inkWord.GetDescender()
descenderLine.Stroke = Brushes.Yellow
theInkCanvas.Children.Add(descenderLine)
' Show the descender line in brown
Dim midline As New Polyline()
midline.Points = inkWord.GetMidline()
midline.Stroke = Brushes.Brown
theInkCanvas.Children.Add(midline)
Next inkWord
// Loop through all of the ink words
ContextNodeCollection inkWords =
theInkAnalyzer.FindNodesOfType(ContextNodeType.InkWord);
foreach (InkWordNode inkWord in inkWords)
{
// Show rotated bounding box in blue
Polygon rotatedBounds = new Polygon();
rotatedBounds.Points = inkWord.GetRotatedBoundingBox();
rotatedBounds.Stroke = Brushes.Blue;
this.theInkCanvas.Children.Add(rotatedBounds);
// Show the ascender line in green
Polyline ascenderLine = new Polyline();
ascenderLine.Points = inkWord.GetAscender();
ascenderLine.Stroke = Brushes.Green;
this.theInkCanvas.Children.Add(ascenderLine);
// Show the baseline in purple
Polyline baseline = new Polyline();
baseline.Points = inkWord.GetBaseline();
baseline.Stroke = Brushes.Purple;
theInkCanvas.Children.Add(baseline);
// Show the descender line in yellow
Polyline descenderLine = new Polyline();
descenderLine.Points = inkWord.GetDescender();
descenderLine.Stroke = Brushes.Yellow;
theInkCanvas.Children.Add(descenderLine);
// Show the midline in brown
Polyline midline = new Polyline();
midline.Points = inkWord.GetMidline();
midline.Stroke = Brushes.Brown;
theInkCanvas.Children.Add(midline);
}
Inheritance Hierarchy
System.Object
System.Windows.Ink.ContextNode
System.Windows.Ink.InkWordNode
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Platforms
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.
Version Information
.NET Framework
Supported in: 3.0