ParagraphNode Class
Represents a ContextNode for a collection of ContextNode objects that make up a logical grouping of lines.
Assembly: Microsoft.Ink.Analysis (in Microsoft.Ink.Analysis.dll)
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 the following types of children:
Any number of LineNode objects.
Any number of InkBulletNode objects.
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 Dim originalParagraphs As ContextNodeCollection = _ theInkAnalyzer.FindNodesOfType(Microsoft.Ink.ContextNodeType.Paragraph) Dim lines As ContextNodeCollection = _ theInkAnalyzer.FindNodesOfType(Microsoft.Ink.ContextNodeType.Line) Dim lineNode As ContextNode For Each lineNode In lines ' Create a new alignment level and paragraph Dim lineParagraph As ContextNode = lineNode.ParentNode Dim writingRegion As ContextNode = lineParagraph.ParentNode Dim newParagraph As ParagraphNode = _ CType(writingRegion.CreateSubNode(Microsoft.Ink.ContextNodeType.Paragraph), ParagraphNode) ' Reparent the line lineNode.Reparent(newParagraph) Next lineNode ' Remove original paragraphs and alignment nodes Dim originalParagraph As ContextNode For Each originalParagraph In originalParagraphs Dim originalAlignmentLevel As ContextNode = originalParagraph.ParentNode originalAlignmentLevel.DeleteSubNode(originalParagraph) originalAlignmentLevel.ParentNode.DeleteSubNode(originalAlignmentLevel) Next originalParagraph
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.