Export (0) Print
Expand All

InkWordNode Class

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

Namespace: System.Windows.Ink
Assembly: IAWinFX (in iawinfx.dll)
XML Namespace:  http://schemas.microsoft.com/winfx/2006/xaml/presentation

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

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 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
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);
}

System.Object
   System.Windows.Ink.ContextNode
    System.Windows.Ink.InkWordNode

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

Community Additions

ADD
Show:
© 2014 Microsoft