Export (0) Print
Expand All

ParagraphNode Class

Represents a ContextNode for a collection of ContextNode objects that make up a logical group of lines.

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

public sealed class ParagraphNode : ContextNode

The exact definition of a paragraph is determined by the analyzing engines, but in general, a paragraph contains groups of lines that should reflow together.

A ParagraphNode object can contain any number of the following types of children:

The following example takes all of the LineNode objects in the ContextNode tree of an InkAnalyzer, theInkAnalyzer, and puts them in their own ParagraphNode objects.

// Take each line and make it its own paragraph
ContextNodeCollection originalParagraphs =
    theInkAnalyzer.FindNodesOfType(ContextNodeType.Paragraph);
ContextNodeCollection lines =
    theInkAnalyzer.FindNodesOfType(ContextNodeType.Line);
foreach (ContextNode lineNode in lines)
{
    // Create a new paragraph
    ContextNode paragraph = lineNode.ParentNode;
    ContextNode writingRegion = paragraph.ParentNode;
    ParagraphNode newParagraph = (ParagraphNode)
        writingRegion.CreateSubNode(ContextNodeType.Paragraph);
    // Reparent the line
    lineNode.Reparent(newParagraph);
}
// Remove original paragraphs  
foreach (ContextNode originalParagraph in originalParagraphs)
{
    ContextNode originalWritingRegion = originalParagraph.ParentNode;
    originalWritingRegion.DeleteSubNode(originalParagraph);
}

System.Object
  System.Windows.Ink.ContextNode
    System.Windows.Ink.ParagraphNode

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

ADD
Show:
© 2014 Microsoft