Search Results for

    Show / Hide Table of Contents

    Class ParagraphIndentation

    Represents the indentation settings applied to a paragraph in a Word document.

    Inheritance
    System.Object
    ParagraphIndentation
    Implements
    System.ICloneable
    Namespace: IronWord.Models
    Assembly: IronWord.dll
    Syntax
    public class ParagraphIndentation : Object

    Indenting a paragraph in a Word document, whether a left margin, a first-line indent, or a hanging indent for a list, is configured through ParagraphIndentation. It collects every indentation measurement that applies to a paragraph so a style can set how far the text sits from the edges and how the first line behaves relative to the rest.

    A developer reaches it through a paragraph's style: ParagraphStyle exposes an Indentation property of this type, so indentation lives with the rest of the style and applies to every paragraph carrying it. Set the values you need on this object, leaving the others unset, then apply the owning style.

    The members group by what they indent. Edges: Left and Right (with their logical counterparts Start and End, which respect text direction) push the whole paragraph in from the sides. Line shape: FirstLine indents only the opening line, and Hanging indents every line except the first, the pattern behind bulleted and numbered text. Character units: each measurement has a *Chars companion (LeftChars, FirstLineChars, HangingChars, and so on) for indentation expressed in character widths instead of physical units. Setting and reading: the Set methods take a nullable value and a MeasurementUnit, and the matching Get methods read a value back in the unit you request; Clone copies the whole set when you want to reuse one paragraph's indentation on another.

    var indentation = new ParagraphIndentation();
    indentation.SetFirstLine(1.0, MeasurementUnit.Centimeter);
    paragraphStyle.Indentation = indentation;

    The add style text how-to covers paragraph styling, and the document element tutorial explains how paragraphs and styles fit together.

    Constructors

    ParagraphIndentation()

    Declaration
    public ParagraphIndentation()

    Properties

    End

    Gets or sets the ending indentation for the paragraph.

    Declaration
    public Nullable<double> End { get; set; }
    Property Value
    Type Description
    System.Nullable<System.Double>

    EndCharacters

    Gets or sets the number of characters to indent at the end of the paragraph.

    Declaration
    public Nullable<double> EndCharacters { get; set; }
    Property Value
    Type Description
    System.Nullable<System.Double>

    FirstLine

    Gets or sets the indentation for the first line of the paragraph.

    Declaration
    public Nullable<double> FirstLine { get; set; }
    Property Value
    Type Description
    System.Nullable<System.Double>

    FirstLineChars

    Gets or sets the number of characters to indent for the first line of the paragraph.

    Declaration
    public Nullable<double> FirstLineChars { get; set; }
    Property Value
    Type Description
    System.Nullable<System.Double>

    Hanging

    Gets or sets the hanging indentation for the paragraph.

    Declaration
    public Nullable<double> Hanging { get; set; }
    Property Value
    Type Description
    System.Nullable<System.Double>

    HangingChars

    Gets or sets the number of characters in a hanging indent for the paragraph.

    Declaration
    public Nullable<double> HangingChars { get; set; }
    Property Value
    Type Description
    System.Nullable<System.Double>

    Left

    Gets or sets the left indentation for the paragraph.

    Declaration
    public Nullable<double> Left { get; set; }
    Property Value
    Type Description
    System.Nullable<System.Double>

    LeftChars

    Gets or sets the number of characters to indent on the left side of the paragraph.

    Declaration
    public Nullable<double> LeftChars { get; set; }
    Property Value
    Type Description
    System.Nullable<System.Double>

    Right

    Gets or sets the right indentation for the paragraph.

    Declaration
    public Nullable<double> Right { get; set; }
    Property Value
    Type Description
    System.Nullable<System.Double>

    RightChars

    Gets or sets the number of characters to indent on the right side of the paragraph.

    Declaration
    public Nullable<double> RightChars { get; set; }
    Property Value
    Type Description
    System.Nullable<System.Double>

    Start

    Gets or sets the starting indentation for the paragraph.

    Declaration
    public Nullable<double> Start { get; set; }
    Property Value
    Type Description
    System.Nullable<System.Double>

    StartCharacters

    Gets or sets the number of characters to indent at the beginning of the paragraph.

    Declaration
    public Nullable<double> StartCharacters { get; set; }
    Property Value
    Type Description
    System.Nullable<System.Double>

    Methods

    Clone()

    Declaration
    public object Clone()
    Returns
    Type Description
    System.Object

    GetEnd(MeasurementUnit)

    Gets the ending indentation for the paragraph.

    Declaration
    public Nullable<double> GetEnd(MeasurementUnit measurementUnit)
    Parameters
    Type Name Description
    MeasurementUnit measurementUnit

    The measurement unit to convert to (default is Twips).

    Returns
    Type Description
    System.Nullable<System.Double>

    The ending indentation in the specified measurement unit.

    GetEndCharacters(MeasurementUnit)

    Gets the number of characters to indent at the end of the paragraph.

    Declaration
    public Nullable<double> GetEndCharacters(MeasurementUnit measurementUnit)
    Parameters
    Type Name Description
    MeasurementUnit measurementUnit

    The measurement unit to convert to (default is Twips).

    Returns
    Type Description
    System.Nullable<System.Double>

    The number of characters to indent at the end of the paragraph in the specified measurement unit.

    GetFirstLine(MeasurementUnit)

    Gets the indentation for the first line of the paragraph.

    Declaration
    public Nullable<double> GetFirstLine(MeasurementUnit measurementUnit)
    Parameters
    Type Name Description
    MeasurementUnit measurementUnit

    The measurement unit to convert to (default is Twips).

    Returns
    Type Description
    System.Nullable<System.Double>

    The indentation for the first line of the paragraph in the specified measurement unit.

    GetFirstLineChars(MeasurementUnit)

    Gets the number of characters to indent for the first line of the paragraph.

    Declaration
    public Nullable<double> GetFirstLineChars(MeasurementUnit measurementUnit)
    Parameters
    Type Name Description
    MeasurementUnit measurementUnit

    The measurement unit to convert to (default is Twips).

    Returns
    Type Description
    System.Nullable<System.Double>

    The number of characters to indent for the first line of the paragraph in the specified measurement unit.

    GetHanging(MeasurementUnit)

    Gets the hanging indentation for the paragraph.

    Declaration
    public Nullable<double> GetHanging(MeasurementUnit measurementUnit)
    Parameters
    Type Name Description
    MeasurementUnit measurementUnit

    The measurement unit to convert to (default is Twips).

    Returns
    Type Description
    System.Nullable<System.Double>

    The hanging indentation in the specified measurement unit.

    GetHangingChars(MeasurementUnit)

    Gets the number of characters in a hanging indent for the paragraph.

    Declaration
    public Nullable<double> GetHangingChars(MeasurementUnit measurementUnit)
    Parameters
    Type Name Description
    MeasurementUnit measurementUnit

    The measurement unit to convert to (default is Twips).

    Returns
    Type Description
    System.Nullable<System.Double>

    The number of characters in a hanging indent for the paragraph in the specified measurement unit.

    GetLeft(MeasurementUnit)

    Gets the left indentation for the paragraph.

    Declaration
    public Nullable<double> GetLeft(MeasurementUnit measurementUnit)
    Parameters
    Type Name Description
    MeasurementUnit measurementUnit

    The measurement unit to convert to (default is Twips).

    Returns
    Type Description
    System.Nullable<System.Double>

    The left indentation in the specified measurement unit.

    GetLeftChars(MeasurementUnit)

    Gets the number of characters to indent on the left side of the paragraph.

    Declaration
    public Nullable<double> GetLeftChars(MeasurementUnit measurementUnit)
    Parameters
    Type Name Description
    MeasurementUnit measurementUnit

    The measurement unit to convert to (default is Twips).

    Returns
    Type Description
    System.Nullable<System.Double>

    The number of characters to indent on the left side of the paragraph in the specified measurement unit.

    GetRight(MeasurementUnit)

    Gets the right indentation for the paragraph.

    Declaration
    public Nullable<double> GetRight(MeasurementUnit measurementUnit)
    Parameters
    Type Name Description
    MeasurementUnit measurementUnit

    The measurement unit to convert to (default is Twips).

    Returns
    Type Description
    System.Nullable<System.Double>

    The right indentation in the specified measurement unit.

    GetRightChars(MeasurementUnit)

    Gets the number of characters to indent on the right side of the paragraph.

    Declaration
    public Nullable<double> GetRightChars(MeasurementUnit measurementUnit)
    Parameters
    Type Name Description
    MeasurementUnit measurementUnit

    The measurement unit to convert to (default is Twips).

    Returns
    Type Description
    System.Nullable<System.Double>

    The number of characters to indent on the right side of the paragraph in the specified measurement unit.

    GetStart(MeasurementUnit)

    Gets the starting indentation for the paragraph.

    Declaration
    public Nullable<double> GetStart(MeasurementUnit measurementUnit)
    Parameters
    Type Name Description
    MeasurementUnit measurementUnit

    The measurement unit to convert to (default is Twips).

    Returns
    Type Description
    System.Nullable<System.Double>

    The starting indentation in the specified measurement unit.

    GetStartCharacters(MeasurementUnit)

    Gets the number of characters to indent at the beginning of the paragraph.

    Declaration
    public Nullable<double> GetStartCharacters(MeasurementUnit measurementUnit)
    Parameters
    Type Name Description
    MeasurementUnit measurementUnit

    The measurement unit to convert to (default is Twips).

    Returns
    Type Description
    System.Nullable<System.Double>

    The number of characters to indent at the beginning of the paragraph in the specified measurement unit.

    SetEnd(Nullable<Double>, MeasurementUnit)

    Sets the ending indentation for the paragraph.

    Declaration
    public void SetEnd(Nullable<double> end, MeasurementUnit measurementUnit)
    Parameters
    Type Name Description
    System.Nullable<System.Double> end

    The ending indentation value.

    MeasurementUnit measurementUnit

    The measurement unit for the indentation.

    SetEndCharacters(Nullable<Double>, MeasurementUnit)

    Sets the number of characters to indent at the end of the paragraph.

    Declaration
    public void SetEndCharacters(Nullable<double> endCharacters, MeasurementUnit measurementUnit)
    Parameters
    Type Name Description
    System.Nullable<System.Double> endCharacters

    The number of characters to indent.

    MeasurementUnit measurementUnit

    The measurement unit for the indentation.

    SetFirstLine(Nullable<Double>, MeasurementUnit)

    Sets the indentation for the first line of the paragraph.

    Declaration
    public void SetFirstLine(Nullable<double> firstLine, MeasurementUnit measurementUnit)
    Parameters
    Type Name Description
    System.Nullable<System.Double> firstLine

    The first line indentation value.

    MeasurementUnit measurementUnit

    The measurement unit for the indentation.

    SetFirstLineChars(Nullable<Double>, MeasurementUnit)

    Sets the number of characters to indent for the first line of the paragraph.

    Declaration
    public void SetFirstLineChars(Nullable<double> firstLineChars, MeasurementUnit measurementUnit)
    Parameters
    Type Name Description
    System.Nullable<System.Double> firstLineChars

    The number of characters to indent.

    MeasurementUnit measurementUnit

    The measurement unit for the indentation.

    SetHanging(Nullable<Double>, MeasurementUnit)

    Sets the hanging indentation for the paragraph.

    Declaration
    public void SetHanging(Nullable<double> hanging, MeasurementUnit measurementUnit)
    Parameters
    Type Name Description
    System.Nullable<System.Double> hanging

    The hanging indentation value.

    MeasurementUnit measurementUnit

    The measurement unit for the indentation.

    SetHangingChars(Nullable<Double>, MeasurementUnit)

    Sets the number of characters in a hanging indent for the paragraph.

    Declaration
    public void SetHangingChars(Nullable<double> hangingChars, MeasurementUnit measurementUnit)
    Parameters
    Type Name Description
    System.Nullable<System.Double> hangingChars

    The number of characters to indent.

    MeasurementUnit measurementUnit

    The measurement unit for the indentation.

    SetLeft(Nullable<Double>, MeasurementUnit)

    Sets the left indentation for the paragraph.

    Declaration
    public void SetLeft(Nullable<double> left, MeasurementUnit measurementUnit)
    Parameters
    Type Name Description
    System.Nullable<System.Double> left

    The left indentation value.

    MeasurementUnit measurementUnit

    The measurement unit for the indentation.

    SetLeftChars(Nullable<Double>, MeasurementUnit)

    Sets the number of characters to indent on the left side of the paragraph.

    Declaration
    public void SetLeftChars(Nullable<double> leftChars, MeasurementUnit measurementUnit)
    Parameters
    Type Name Description
    System.Nullable<System.Double> leftChars

    The number of characters to indent.

    MeasurementUnit measurementUnit

    The measurement unit for the indentation.

    SetRight(Nullable<Double>, MeasurementUnit)

    Sets the right indentation for the paragraph.

    Declaration
    public void SetRight(Nullable<double> right, MeasurementUnit measurementUnit)
    Parameters
    Type Name Description
    System.Nullable<System.Double> right

    The right indentation value.

    MeasurementUnit measurementUnit

    The measurement unit for the indentation.

    SetRightChars(Nullable<Double>, MeasurementUnit)

    Sets the number of characters to indent on the right side of the paragraph.

    Declaration
    public void SetRightChars(Nullable<double> rightChars, MeasurementUnit measurementUnit)
    Parameters
    Type Name Description
    System.Nullable<System.Double> rightChars

    The number of characters to indent.

    MeasurementUnit measurementUnit

    The measurement unit for the indentation.

    SetStart(Nullable<Double>, MeasurementUnit)

    Sets the starting indentation for the paragraph.

    Declaration
    public void SetStart(Nullable<double> start, MeasurementUnit measurementUnit)
    Parameters
    Type Name Description
    System.Nullable<System.Double> start

    The starting indentation value.

    MeasurementUnit measurementUnit

    The measurement unit for the indentation.

    SetStartCharacters(Nullable<Double>, MeasurementUnit)

    Sets the number of characters to indent at the beginning of the paragraph.

    Declaration
    public void SetStartCharacters(Nullable<double> startCharacters, MeasurementUnit measurementUnit)
    Parameters
    Type Name Description
    System.Nullable<System.Double> startCharacters

    The number of characters to indent.

    MeasurementUnit measurementUnit

    The measurement unit for the indentation.

    Implements

    System.ICloneable
    ☀
    ☾
    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