Search Results for

    Show / Hide Table of Contents

    Class MultiLevelTextList

    Represents a multi-level text list within the document.

    Inheritance
    System.Object
    ContentElement
    ParentElement
    MultiLevelTextList
    Implements
    IronSoftware.Abstractions.Word.IWordDocumentObject
    IronSoftware.Abstractions.IDocumentObject
    System.ICloneable
    IronSoftware.Abstractions.IParent<IronSoftware.Abstractions.Word.IWordDocumentObjectCollection, IronSoftware.Abstractions.Word.IWordDocumentObject>
    Inherited Members
    ParentElement.AddChild(IWordDocumentObject[])
    ParentElement.InsertChildToIndex(Int32, IWordDocumentObject[])
    ParentElement.Remove()
    ParentElement.RemoveChildren(IWordDocumentObject[])
    ParentElement.RemoveAllChildren()
    ParentElement.ExtractElements<T>()
    ParentElement.GetChildByIndex<T>(Int32)
    ParentElement.Clone()
    ParentElement.CloneObject()
    ParentElement.LogObjectTree()
    ParentElement.Texts
    ParentElement.Tables
    ParentElement.Children
    ContentElement.Replace(IWordDocumentObject)
    ContentElement.GetIndex<T>()
    ContentElement.Parent
    ContentElement.Status
    Namespace: IronWord.Models
    Assembly: IronWord.dll
    Syntax
    public class MultiLevelTextList : ParentElement

    MultiLevelTextList builds the numbered or bulleted lists in a Word document, including outlines that nest several levels deep. It gathers the ListItem entries that make up the list and carries the formatting that decides whether they appear as numbers or bullets, how they are justified, and how far each level indents.

    A developer assembles the list, then attaches it to a WordDocument with AddMultiLevelTextList; the document's MultiLevelTextLists property holds the lists already added, and Index reports a list's position among them. Entries come from ListItem objects, each built from a Paragraph, and a nested list lives beneath an item to form the next level. This is the type behind a checklist, a legal outline, or any ordered series in the body.

    Add and remove entries with AddItem, RemoveItem, and Clear, all of which take a ListItem. Items exposes the current entries, so you can inspect or reorder them before the list is rendered. ListType selects numbering versus bullets, Justification aligns the text, and SymbolText with SymbolTextFontName set the bullet glyph and its font for a level. StartNumberingValue chooses the first number, useful when a list resumes counting from an earlier section, and NumberingId ties related lists together so they share one numbering sequence across breaks. Indentation is controlled in real units: SetStartIndentation and SetHangingIndentation take a value plus a MeasurementUnit, and the matching GetStartIndentation and GetHangingIndentation read them back in the unit you ask for. Build the entries before attaching the list so the numbering and indentation are settled when the document renders.

    var list = new MultiLevelTextList();
    list.AddItem(new ListItem(new Paragraph("First")));
    list.AddItem(new ListItem(new Paragraph("Second")));
    document.AddMultiLevelTextList(list);

    The add list example builds a numbered list, the add bullet list example demonstrates the bulleted form, and the document element tutorial shows how lists sit within a document.

    Constructors

    MultiLevelTextList()

    Initializes a new instance of the MultiLevelTextList class.

    Declaration
    public MultiLevelTextList()

    MultiLevelTextList(ListItem[])

    Initializes a new instance of the MultiLevelTextList class with the specified ListItems as child elements.

    Declaration
    public MultiLevelTextList(params ListItem[] children)
    Parameters
    Type Name Description
    ListItem[] children

    The child elements to be added.

    Properties

    HangingIndentation

    Gets or sets the hanging indentation for a multilevel list.

    Declaration
    public double HangingIndentation { get; set; }
    Property Value
    Type Description
    System.Double
    Remarks

    The indentation is measured in inches by default and converted to twips when accessed or modified.

    Index

    Gets the index of this MultiLevelTextList within the parent's list of children.

    Declaration
    public int Index { get; set; }
    Property Value
    Type Description
    System.Int32

    Items

    Gets the list of ListItem contained within this MultiLevelTextList.

    Declaration
    public List<ListItem> Items { get; }
    Property Value
    Type Description
    System.Collections.Generic.List<ListItem>

    Justification

    Gets or sets the justification for the text in a multilevel list.

    Declaration
    public JustificationValues Justification { get; set; }
    Property Value
    Type Description
    IronSoftware.Abstractions.Word.JustificationValues

    ListType

    Gets or sets the type of numbering or bullet for a multilevel list.

    Declaration
    public NumberFormatValues ListType { get; set; }
    Property Value
    Type Description
    NumberFormatValues

    NumberingId

    Declaration
    protected int NumberingId { get; set; }
    Property Value
    Type Description
    System.Int32

    StartIndentation

    Gets or sets the starting indentation for a multilevel list.

    Declaration
    public double StartIndentation { get; set; }
    Property Value
    Type Description
    System.Double
    Remarks

    The indentation is measured in inches by default and converted to twips when accessed or modified.

    StartNumberingValue

    Gets or sets the starting value for numbering in a multilevel list.

    Declaration
    public int StartNumberingValue { get; set; }
    Property Value
    Type Description
    System.Int32

    SymbolText

    Gets or sets the SymbolText for a specific level in a multilevel list.

    Declaration
    public string SymbolText { get; set; }
    Property Value
    Type Description
    System.String
    Remarks

    The SymbolText property defines the format of the numbering or bullet text for a specific level in a multilevel list.

    SymbolTextFontName

    Gets or sets the SymbolText font for a specific level in a multilevel list.

    Declaration
    public string SymbolTextFontName { get; set; }
    Property Value
    Type Description
    System.String
    Remarks

    The SymbolTextFontName property defines the SymbolText font for a specific level in a multilevel list.

    Methods

    AddItem(ListItem)

    Adds a new ListItem to this MultiLevelTextList.

    Declaration
    public void AddItem(ListItem item)
    Parameters
    Type Name Description
    ListItem item

    Clear(ListItem)

    Removes all ListItems from this MultiLevelTextList.

    Declaration
    public void Clear(ListItem item)
    Parameters
    Type Name Description
    ListItem item

    GetHangingIndentation(MeasurementUnit)

    Gets the hanging indentation for a multilevel list.

    Declaration
    public double GetHangingIndentation(MeasurementUnit measurementUnit)
    Parameters
    Type Name Description
    MeasurementUnit measurementUnit

    The measurement unit for the indentation. Default is Twips.

    Returns
    Type Description
    System.Double

    The hanging indentation value in the specified measurement unit.

    GetStartIndentation(MeasurementUnit)

    Gets the starting indentation for a multilevel list.

    Declaration
    public double GetStartIndentation(MeasurementUnit measurementUnit)
    Parameters
    Type Name Description
    MeasurementUnit measurementUnit

    The measurement unit for the indentation. Default is Twips.

    Returns
    Type Description
    System.Double

    The starting indentation value in the specified measurement unit.

    RemoveItem(ListItem)

    Removes a ListItem from this MultiLevelTextList.

    Declaration
    public void RemoveItem(ListItem item)
    Parameters
    Type Name Description
    ListItem item

    SetHangingIndentation(Double, MeasurementUnit)

    Sets the hanging indentation for a multilevel list.

    Declaration
    public void SetHangingIndentation(double hangingIndentation, MeasurementUnit measurementUnit)
    Parameters
    Type Name Description
    System.Double hangingIndentation

    The hanging indentation value.

    MeasurementUnit measurementUnit

    The measurement unit for the indentation. Default is Twips.

    SetStartIndentation(Double, MeasurementUnit)

    Sets the starting indentation for a multilevel list.

    Declaration
    public void SetStartIndentation(double startIndentation, MeasurementUnit measurementUnit)
    Parameters
    Type Name Description
    System.Double startIndentation

    The starting indentation value.

    MeasurementUnit measurementUnit

    The measurement unit for the indentation. Default is Twips.

    Implements

    IronSoftware.Abstractions.Word.IWordDocumentObject
    IronSoftware.Abstractions.IDocumentObject
    System.ICloneable
    IronSoftware.Abstractions.IParent<, >

    Inherited members

    AddChild(IWordDocumentObject[])
    InsertChildToIndex(Int32, IWordDocumentObject[])
    Remove()
    RemoveChildren(IWordDocumentObject[])
    RemoveAllChildren()
    ExtractElements<T>()
    GetChildByIndex<T>(Int32)
    Clone()
    CloneObject()
    LogObjectTree()
    Texts
    Tables
    Children
    Replace(IWordDocumentObject)
    GetIndex<T>()
    Parent
    Status
    ☀
    ☾
    Downloads
    • Download with NuGet
    • Start for Free
    In This Article
    Back to top
    Install with NuGet
    IronWord_for_dotnet_log2o
    Blue key in circleGet started for FREE
    No credit card required
    Test in a live environment

    Test in production without watermarks.
    Works wherever you need it to.

    Fully-functional product

    Get 30 days of fully functional product.
    Have it up and running in minutes.

    24/5 technical support

    Full access to our support engineering team during your product trial

    Grey key in circleGet started for FREE
    The trial form was submitted successfully.
    Calendar in circleBook Free Live Demo
    No contact, no card details, no commitments Book a 30-minute, personal demo.
    Here's what to expect:

    A live demo of our product and its key features

    Get project specific feature recommendations

    All your questions are answered to make sure you have all the information you need. (No commitment whatsoever.)

    Grey key in circleBook Free Live Demo
    Your booking has been completed Check your e-mail for confirmation
    Support Team Member 6 related to The C# PDF Library Support Team Member 14 related to The C# PDF Library Support Team Member 4 related to The C# PDF Library Support Team Member 2 related to The C# PDF Library
    Online 24/5
    Need help? Our sales team would be glad to help you.
    Try the Enterprise Trial
    ironpdf_for_dotnet_log2o
    Key in blue circle
    Get your free 30-day Trial Key instantly.
    bullet_checkedNo credit card or account creation required
    Key in blue circle
    Get your free 30-day Trial Key instantly.
    Blue key in circleNo credit card or account creation required
    Green Check in orange circle
    The trial form was submitted successfully.
    badge_greencheck_in_yellowcircle
    Thank you for starting a trial

    Please check your email for the trial license key.

    If you don’t receive an email, please start a live chat or email support@ironsoftware.com

    Install with NuGet
    View Licensing
    • Logo Aetna
    • Logo NASA
    • Logo GE
    • Logo Porsche
    • Logo USDA
    • Logo Qatar
    Join Millions of Engineers who’ve tried IronWord