ParagraphNode.AlignmentLevel Property

Gets and sets an integer that represents how the current paragraph is aligned with other paragraphs in their parent WritingRegionNode object.

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

Syntax

'Declaration
Public Property AlignmentLevel As Integer
'Usage
Dim instance As ParagraphNode
Dim value As Integer

value = instance.AlignmentLevel

instance.AlignmentLevel = value
public int AlignmentLevel { get; set; }
public:
property int AlignmentLevel {
    int get ();
    void set (int value);
}
/** @property */
public int get_AlignmentLevel ()

/** @property */
public void set_AlignmentLevel (int value)
public function get AlignmentLevel () : int

public function set AlignmentLevel (value : int)
Not applicable.

Property Value

The integer that represents how the current paragraph is aligned with other paragraphs in their parent WritingRegionNode object.

Remarks

The AlignmentLevel property is often used to indicate level of indentation. For example, if the ink represents an outline, then each line is likely to be a ParagraphNode object, and the AlignmentLevel value is expected to be 0 for the first level of indentation, 1 for the next level, and so forth.

Example

The following example takes a ParagraphNode object, selectedParagraph, and fills an ArrayList, alignedParagraphs, with all other ParagraphNode objects in the same WritingRegionNode that have the same AlignmentLevel value.

Dim alignedParagraphs As New ArrayList()
Dim paragraphParent As ContextNode = selectedParagraph.ParentNode

For Each childNode As ContextNode In paragraphParent.SubNodes
    If TypeOf childNode Is ParagraphNode Then
        Dim paragraph As ParagraphNode = CType(childNode, ParagraphNode)
        If paragraph.AlignmentLevel = selectedParagraph.AlignmentLevel Then
            alignedParagraphs.Add(paragraph)
        End If
    End If
Next childNode
ArrayList alignedParagraphs = new ArrayList();
ContextNode paragraphParent = selectedParagraph.ParentNode;
foreach (ContextNode childNode in paragraphParent.SubNodes)
{
    if (childNode is ParagraphNode)
    {
        ParagraphNode paragraph = (ParagraphNode)childNode;
        if (paragraph.AlignmentLevel == selectedParagraph.AlignmentLevel)
        {
            alignedParagraphs.Add(paragraph);
        }
    }
}

Platforms

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.

Version Information

.NET Framework

Supported in: 3.0

See Also

Reference

ParagraphNode Class
ParagraphNode Members
System.Windows.Ink Namespace