ITextParagraphFormat ITextParagraphFormat ITextParagraphFormat Interface

Defines the default paragraph formatting attributes of a document, or the current paragraph formatting attributes of a text range.

Syntax

Declaration

public interface ITextParagraphFormatpublic interface ITextParagraphFormatPublic Interface ITextParagraphFormat

Properties summary

Gets or sets the paragraph alignment.

Gets the amount used to indent the first line of a paragraph relative to the left indent.

Gets or sets whether page breaks are allowed in paragraphs.

Gets or sets whether page breaks are allowed between paragraphs in a range.

Gets the amount used to indent all lines except the first line of a paragraph.

Gets the paragraph line-spacing value.

Gets the paragraph line-spacing rule.

Gets or sets the alignment to use for bulleted and numbered lists.

Gets or sets the list level index used with paragraphs.

Gets or sets the starting value or code of a list numbering sequence.

Gets or sets the style used to mark the item paragraphs in a list.

Gets or sets the list tab setting, which is the distance between the first indent and the start of the text on the first line.

Gets or sets the kind of characters used to mark the item paragraphs in a list.

Gets or sets whether paragraph numbering is suppressed.

Gets or sets whether there is a page break before a paragraph.

Gets or sets the right margin of a paragraph.

Gets or sets whether the paragraph uses right-to-left formatting.

Gets or sets the amount of vertical space that follows a paragraph.

Gets or sets the amount of vertical space above a paragraph.

Gets or sets the paragraph style.

Retrieves the tab count.

Gets or sets whether widow and orphan suppression is on or off.

Methods summary

Adds a new tab at the specified position.

Clears all tabs, reverting to equally spaced tabs with the default tab spacing.

Deletes the tab at the specified position.

Creates a new object that is identical to this paragraph format object.

Retrieves information about the specified tab.

Determines whether this paragraph format object has the same properties as the specified paragraph format object.

Sets the paragraph formatting by copying another paragraph formatting object.

Sets the first-line indent, the left indent, and the right indent for a paragraph.

Sets the paragraph line-spacing rule and the amount of line spacing for a paragraph.

Properties

  • Alignment
    Alignment
    Alignment
    Alignment

    Gets or sets the paragraph alignment.

    public ParagraphAlignment Alignment { get; set; }public ParagraphAlignment Alignment { get; set; }Public ReadWrite Property Alignment As ParagraphAlignmentpublic ParagraphAlignment Alignment { get; set; }

    Property Value

  • FirstLineIndent
    FirstLineIndent
    FirstLineIndent
    FirstLineIndent

    Gets the amount used to indent the first line of a paragraph relative to the left indent.

    public float FirstLineIndent { get; }public float FirstLineIndent { get; }Public ReadOnly Property FirstLineIndent As floatpublic float FirstLineIndent { get; }

    Property Value

    • float
      float
      float

      The first line indentation amount, in floating-point points.

    Remarks

    The left indent applies to all lines of the paragraph except the first line.

  • KeepTogether
    KeepTogether
    KeepTogether
    KeepTogether

    Gets or sets whether page breaks are allowed in paragraphs.

    public FormatEffect KeepTogether { get; set; }public FormatEffect KeepTogether { get; set; }Public ReadWrite Property KeepTogether As FormatEffectpublic FormatEffect KeepTogether { get; set; }

    Property Value

  • KeepWithNext
    KeepWithNext
    KeepWithNext
    KeepWithNext

    Gets or sets whether page breaks are allowed between paragraphs in a range.

    public FormatEffect KeepWithNext { get; set; }public FormatEffect KeepWithNext { get; set; }Public ReadWrite Property KeepWithNext As FormatEffectpublic FormatEffect KeepWithNext { get; set; }

    Property Value

  • LeftIndent
    LeftIndent
    LeftIndent
    LeftIndent

    Gets the amount used to indent all lines except the first line of a paragraph.

    public float LeftIndent { get; }public float LeftIndent { get; }Public ReadOnly Property LeftIndent As floatpublic float LeftIndent { get; }

    Property Value

    • float
      float
      float

      The amount of left indentation, in floating-point points. Indentation is relative to the left margin.

  • LineSpacing
    LineSpacing
    LineSpacing
    LineSpacing

    Gets the paragraph line-spacing value.

    public float LineSpacing { get; }public float LineSpacing { get; }Public ReadOnly Property LineSpacing As floatpublic float LineSpacing { get; }

    Property Value

    • float
      float
      float

      The line spacing value. The meaning depends on the value of the LineSpacingRule property. The line spacing value is in floating-point points except when the line-spacing rule is Multiple or Percent.

  • LineSpacingRule
    LineSpacingRule
    LineSpacingRule
    LineSpacingRule

    Gets the paragraph line-spacing rule.

    public LineSpacingRule LineSpacingRule { get; }public LineSpacingRule LineSpacingRule { get; }Public ReadOnly Property LineSpacingRule As LineSpacingRulepublic LineSpacingRule LineSpacingRule { get; }

    Property Value

  • ListAlignment
    ListAlignment
    ListAlignment
    ListAlignment

    Gets or sets the alignment to use for bulleted and numbered lists.

    public MarkerAlignment ListAlignment { get; set; }public MarkerAlignment ListAlignment { get; set; }Public ReadWrite Property ListAlignment As MarkerAlignmentpublic MarkerAlignment ListAlignment { get; set; }

    Property Value

  • ListLevelIndex
    ListLevelIndex
    ListLevelIndex
    ListLevelIndex

    Gets or sets the list level index used with paragraphs.

    public int ListLevelIndex { get; set; }public int ListLevelIndex { get; set; }Public ReadWrite Property ListLevelIndex As intpublic int ListLevelIndex { get; set; }

    Property Value

    • int
      int
      int

      The list level index. It can be a value of 0 or higher, as described in the following table.

      ValueMeaning
      0No list.
      1First-level (outermost) list.
      2Second-level (nested) list. This is nested under a level 1 list item.
      3Third-level (nested) list. This is nested under a level 2 list item.
      And so onNesting continues similarly.

      Up to three levels are common in HTML documents.

    Remarks

    Setting the list level index doesn't automatically change a list's indentation and other paragraph properties.

  • ListStart
    ListStart
    ListStart
    ListStart

    Gets or sets the starting value or code of a list numbering sequence.

    public int ListStart { get; set; }public int ListStart { get; set; }Public ReadWrite Property ListStart As intpublic int ListStart { get; set; }

    Property Value

    • int
      int
      int

      The starting value or code of a list numbering sequence.

  • ListStyle
    ListStyle
    ListStyle
    ListStyle

    Gets or sets the style used to mark the item paragraphs in a list.

    public MarkerStyle ListStyle { get; set; }public MarkerStyle ListStyle { get; set; }Public ReadWrite Property ListStyle As MarkerStylepublic MarkerStyle ListStyle { get; set; }

    Property Value

  • ListTab
    ListTab
    ListTab
    ListTab

    Gets or sets the list tab setting, which is the distance between the first indent and the start of the text on the first line.

    public float ListTab { get; set; }public float ListTab { get; set; }Public ReadWrite Property ListTab As floatpublic float ListTab { get; set; }

    Property Value

    • float
      float
      float

      The list tab setting.

    Remarks

    Numbered or bulleted text is left-justified, centered, or right-justified at the first-line indent value. Use ListAlignment to determine the text position.

  • ListType
    ListType
    ListType
    ListType

    Gets or sets the kind of characters used to mark the item paragraphs in a list.

    public MarkerType ListType { get; set; }public MarkerType ListType { get; set; }Public ReadWrite Property ListType As MarkerTypepublic MarkerType ListType { get; set; }

    Property Value

  • NoLineNumber
    NoLineNumber
    NoLineNumber
    NoLineNumber

    Gets or sets whether paragraph numbering is suppressed.

    public FormatEffect NoLineNumber { get; set; }public FormatEffect NoLineNumber { get; set; }Public ReadWrite Property NoLineNumber As FormatEffectpublic FormatEffect NoLineNumber { get; set; }

    Property Value

    Remarks

    When the paragraphs are numbered, the number appears on the first line of the paragraph.

  • PageBreakBefore
    PageBreakBefore
    PageBreakBefore
    PageBreakBefore

    Gets or sets whether there is a page break before a paragraph.

    public FormatEffect PageBreakBefore { get; set; }public FormatEffect PageBreakBefore { get; set; }Public ReadWrite Property PageBreakBefore As FormatEffectpublic FormatEffect PageBreakBefore { get; set; }

    Property Value

  • RightIndent
    RightIndent
    RightIndent
    RightIndent

    Gets or sets the right margin of a paragraph.

    public float RightIndent { get; set; }public float RightIndent { get; set; }Public ReadWrite Property RightIndent As floatpublic float RightIndent { get; set; }

    Property Value

    • float
      float
      float

      The size of the right margin, in floating-point points.

  • RightToLeft
    RightToLeft
    RightToLeft
    RightToLeft

    Gets or sets whether the paragraph uses right-to-left formatting.

    public FormatEffect RightToLeft { get; set; }public FormatEffect RightToLeft { get; set; }Public ReadWrite Property RightToLeft As FormatEffectpublic FormatEffect RightToLeft { get; set; }

    Property Value

  • SpaceAfter
    SpaceAfter
    SpaceAfter
    SpaceAfter

    Gets or sets the amount of vertical space that follows a paragraph.

    public float SpaceAfter { get; set; }public float SpaceAfter { get; set; }Public ReadWrite Property SpaceAfter As floatpublic float SpaceAfter { get; set; }

    Property Value

    • float
      float
      float

      The amount of vertical space, in floating-point points.

  • SpaceBefore
    SpaceBefore
    SpaceBefore
    SpaceBefore

    Gets or sets the amount of vertical space above a paragraph.

    public float SpaceBefore { get; set; }public float SpaceBefore { get; set; }Public ReadWrite Property SpaceBefore As floatpublic float SpaceBefore { get; set; }

    Property Value

    • float
      float
      float

      The amount of vertical space, in floating-point points.

  • Style
    Style
    Style
    Style

    Gets or sets the paragraph style.

    public ParagraphStyle Style { get; set; }public ParagraphStyle Style { get; set; }Public ReadWrite Property Style As ParagraphStylepublic ParagraphStyle Style { get; set; }

    Property Value

  • TabCount
    TabCount
    TabCount
    TabCount

    Retrieves the tab count.

    public int TabCount { get; }public int TabCount { get; }Public ReadOnly Property TabCount As intpublic int TabCount { get; }

    Property Value

    • int
      int
      int

      The tab count.

    Remarks

    The tab count of a new instance can be nonzero; for example, Microsoft Word stories begin with no explicit tabs defined, while rich edit instances start with a single explicit tab. To ensure there are no explicit tabs (that is, to set the tab count to zero), call the ClearAllTabs() method.

  • WidowControl
    WidowControl
    WidowControl
    WidowControl

    Gets or sets whether widow and orphan suppression is on or off.

    public FormatEffect WidowControl { get; set; }public FormatEffect WidowControl { get; set; }Public ReadWrite Property WidowControl As FormatEffectpublic FormatEffect WidowControl { get; set; }

    Property Value

    Remarks

    A widow is created when the last line of a paragraph is printed by itself at the top of a page. An orphan is when the first line of a paragraph is printed by itself at the bottom of a page.

Methods

  • AddTab(Single, TabAlignment, TabLeader)
    AddTab(Single, TabAlignment, TabLeader)
    AddTab(Single, TabAlignment, TabLeader)
    AddTab(Single, TabAlignment, TabLeader)

    Adds a new tab at the specified position.

    public void AddTab(Single position, TabAlignment align, TabLeader leader)public void AddTab(Single position, TabAlignment align, TabLeader leader)Public Function AddTab(position As Single, align As TabAlignment, leader As TabLeader) As voidpublic void AddTab(Single position, TabAlignment align, TabLeader leader)

    Parameters

    • position
      System.Single
      System.Single
      System.Single

      The position of the new tab, in floating-point points relative to the left side of the page for left-to-right paragraphs, or the right side of the page for right-to-left paragraphs. A maximum of 63 tabs are allowed. Tabs beyond the page are ignored. Negative tabs are not valid.

    • align

      The alignment option for the tab position.

    • leader

      The character used to fill the space taken by a tab character.

  • ClearAllTabs()
    ClearAllTabs()
    ClearAllTabs()
    ClearAllTabs()

    Clears all tabs, reverting to equally spaced tabs with the default tab spacing.

    public void ClearAllTabs()public void ClearAllTabs()Public Function ClearAllTabs() As voidpublic void ClearAllTabs()
  • DeleteTab(Single)
    DeleteTab(Single)
    DeleteTab(Single)
    DeleteTab(Single)

    Deletes the tab at the specified position.

    public void DeleteTab(Single position)public void DeleteTab(Single position)Public Function DeleteTab(position As Single) As voidpublic void DeleteTab(Single position)

    Parameters

    • position
      System.Single
      System.Single
      System.Single

      The position of the tab to delete, in floating-point points.

  • GetClone()
    GetClone()
    GetClone()
    GetClone()

    Creates a new object that is identical to this paragraph format object.

    public ITextParagraphFormat GetClone()public ITextParagraphFormat GetClone()Public Function GetClone() As ITextParagraphFormatpublic ITextParagraphFormat GetClone()

    Returns

  • GetTab(Int32, Single, TabAlignment, TabLeader)
    GetTab(Int32, Single, TabAlignment, TabLeader)
    GetTab(Int32, Single, TabAlignment, TabLeader)
    GetTab(Int32, Single, TabAlignment, TabLeader)

    Retrieves information about the specified tab.

    public void GetTab(Int32 index, Single position, TabAlignment align, TabLeader leader)public void GetTab(Int32 index, Single position, TabAlignment align, TabLeader leader)Public Function GetTab(index As Int32, position As Single, align As TabAlignment, leader As TabLeader) As voidpublic void GetTab(Int32 index, Single position, TabAlignment align, TabLeader leader)

    Parameters

    • index
      System.Int32
      System.Int32
      System.Int32

      The zero-based index of the tab to retrieve.

    • position
      System.Single
      System.Single
      System.Single

      The tab's position, in floating-point points. This parameter is zero if the tab does not exist.

    • align

      The alignment option for the tab position.

    • leader

      The character used to fill the space taken by a tab character.

  • IsEqual(ITextParagraphFormat)
    IsEqual(ITextParagraphFormat)
    IsEqual(ITextParagraphFormat)
    IsEqual(ITextParagraphFormat)

    Determines whether this paragraph format object has the same properties as the specified paragraph format object.

    public bool IsEqual(ITextParagraphFormat format)public bool IsEqual(ITextParagraphFormat format)Public Function IsEqual(format As ITextParagraphFormat) As boolpublic bool IsEqual(ITextParagraphFormat format)

    Parameters

    Returns

    • bool
      bool
      bool

      True if the objects have the same properties, or false if they don't.

  • SetClone(ITextParagraphFormat)
    SetClone(ITextParagraphFormat)
    SetClone(ITextParagraphFormat)
    SetClone(ITextParagraphFormat)

    Sets the paragraph formatting by copying another paragraph formatting object.

    public void SetClone(ITextParagraphFormat format)public void SetClone(ITextParagraphFormat format)Public Function SetClone(format As ITextParagraphFormat) As voidpublic void SetClone(ITextParagraphFormat format)

    Parameters

    Remarks

    Any paragraph formatting values that are undefined in value have no effect.

  • SetIndents(Single, Single, Single)
    SetIndents(Single, Single, Single)
    SetIndents(Single, Single, Single)
    SetIndents(Single, Single, Single)

    Sets the first-line indent, the left indent, and the right indent for a paragraph.

    public void SetIndents(Single start, Single left, Single right)public void SetIndents(Single start, Single left, Single right)Public Function SetIndents(start As Single, left As Single, right As Single) As voidpublic void SetIndents(Single start, Single left, Single right)

    Parameters

    • start
      System.Single
      System.Single
      System.Single

      The indent of the first line in a paragraph, relative to the left indent. The value is in floating-point points and can be positive or negative.

    • left
      System.Single
      System.Single
      System.Single

      The left indent of all lines except the first line in a paragraph, relative to the left margin. The value is in floating-point points and can be positive or negative.

    • right
      System.Single
      System.Single
      System.Single

      The right indent of all lines in a paragraph, relative to the right margin. The value is in floating-point points and can be positive or negative. This value is optional.

    Remarks

    Line indents cannot position text in the margins. If the first-line indent is set to a negative value, for an outdented paragraph, while the left indent is zero, the first-line indent is reset to zero. To avoid this problem while retaining property sets, explicitly set the first-line indent value equal to zero, and then call SetIndents(Single, Single, Single) to set a nonnegative, left-indent value and set the desired first-line indent.

  • SetLineSpacing(LineSpacingRule, Single)
    SetLineSpacing(LineSpacingRule, Single)
    SetLineSpacing(LineSpacingRule, Single)
    SetLineSpacing(LineSpacingRule, Single)

    Sets the paragraph line-spacing rule and the amount of line spacing for a paragraph.

    public void SetLineSpacing(LineSpacingRule rule, Single spacing)public void SetLineSpacing(LineSpacingRule rule, Single spacing)Public Function SetLineSpacing(rule As LineSpacingRule, spacing As Single) As voidpublic void SetLineSpacing(LineSpacingRule rule, Single spacing)

    Parameters

    • rule

      The new line-spacing rule.

    • spacing
      System.Single
      System.Single
      System.Single

      The new line spacing amount. If the line-spacing rule interprets the spacing value as a linear dimension, spacing is given in floating-point points.

    Remarks

    Because the line-spacing rule and line spacing work together, they must be set together.

Device family

Windows 10 (introduced v10.0.10240.0)

API contract

Windows.Foundation.UniversalApiContract (introduced v1)

Attributes

Windows.Foundation.Metadata.ContractVersionAttribute
Windows.Foundation.Metadata.GuidAttribute
Windows.Foundation.Metadata.WebHostHiddenAttribute

Details

Assembly

Windows.UI.Text.dll