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, 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
    %s requires a valid license key for further deployment. Get Trial Below.
    ironsuite
    Blue key in circleGet Started for Free
    30 days full access • 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.
    Grey check in circleTrial key delivered
    Your key has been issued and sent to your email.
    Calendar in circleBook Free Live Demo
    No cards • no pitches • no commitments Pick a time for a quick, personalized demo
    Get the most out of your 30-day trial with:

    Live product and key features walk-through

    Project-specific recommendations

    All your questions answered

    Grey key in circleBook Free Live Demo
    Your booking has been completed Check your e-mail for confirmation

    Want to deploy Iron Suite
    to a live project for FREE?

    What’s included?

    • Test in production without watermarks
    • 30 days fully functional product
    • 24/5 technical support during trial
    ironpdf Logo
    ironword Logo
    ironxl Logo
    ironppt Logo
    ironocr Logo
    ironbarcode Logo
    ironqr Logo
    ironprint Logo
    ironzip Logo
    ironwebscraper Logo
    Iron Software sales team
    Online 24/5
    Have Enterprise licensing requirements?
    Request Iron Suite Enterprise trial
    Key in blue circle

    Get your free 30-day Trial Key instantly

    Your trial license will be sent to your email address

    No limitations. 100% unlocked. No credit card.

    bullet_checkedNo credit card or account creation requiredNo limitations. 100% unlocked. No credit card.
    Or
    Key in blue circle

    Complete Your Trial Key Signup

    Tell us a little more about yourself.

    Key in blue circleNo credit card or account creation requiredNo limitations. 100% unlocked. No credit card.
    Key in blue circle

    Your license key has been delivered to your inbox

    Can't find it? Check your spam folder.

    What’s next?
    Install with NuGet
    Add IronWord to your project
    Quickstart Guide
    Helpful resources to get started

    Need help getting started?

    Book a Free Live Demo

    See IronWord in action and get your licensing questions answered, or

    Key in blue circle

    Your demo request is in.

    You'll receive an invite via email shortly.

    What’s next?
    Explore Documentation
    Review Licensing Options
    badge_greencheck_in_yellowcircle
    Thank you
    Your trial key should be in the email.
    If it is not, please contact support@ironsoftware.com
    • Logo Aetna
    • Logo NASA
    • Logo GE
    • Logo Porsche
    • Logo USDA
    • Logo Qatar
    Join Millions of Engineers who’ve tried IronWord
    Your trial key should be in the email.
    If it is not, please contact support@ironsoftware.com