ParagraphFormat
Overview
ParagraphFormat is a class in Aspose.Words FOSS for .NET.
Inherits from: IBorderAttrSource, IShadingAttrSource.
Represents all the formatting for a paragraph.
This class provides 1 method for working with ParagraphFormat objects in .NET programs.
Available methods include: ClearFormatting.
All public members are accessible to any .NET application after installing the Aspose.Words FOSS for .NET package.
Properties: AddSpaceBetweenFarEastAndAlpha, AddSpaceBetweenFarEastAndDigit, Alignment, BaselineAlignment, Bidi, Borders, and 36 more.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
Alignment | ParagraphAlignment | Read/Write | Gets or sets text alignment for the paragraph. |
BaselineAlignment | BaselineAlignment | Read/Write | Gets or sets fonts vertical position on a line. |
NoSpaceBetweenParagraphsOfSameStyle | bool | Read/Write | When true, SpaceBefore and SpaceAfter will be ignored between the paragraphs of the same style. |
KeepTogether | bool | Read/Write | True if all lines in the paragraph are to remain on the same page. |
KeepWithNext | bool | Read/Write | True if the paragraph is to remains on the same page as the paragraph that follows it. |
PageBreakBefore | bool | Read/Write | True if a page break is forced before the paragraph. |
SuppressLineNumbers | bool | Read/Write | Specifies whether the current paragraph’s lines should be exempted from line numbering which is applied in the parent section. |
SuppressAutoHyphens | bool | Read/Write | Specifies whether the current paragraph should be exempted from any hyphenation which is applied in the document settings. |
WidowControl | bool | Read/Write | True if the first and last lines in the paragraph are to remain on the same page as the rest of the paragraph. |
AddSpaceBetweenFarEastAndAlpha | bool | Read/Write | Gets or sets a flag indicating whether inter-character spacing is automatically adjusted between regions of Latin text and regions of East Asian text in the current paragraph. |
AddSpaceBetweenFarEastAndDigit | bool | Read/Write | Gets or sets a flag indicating whether inter-character spacing is automatically adjusted between regions of numbers and regions of East Asian text in the current paragraph. |
FarEastLineBreakControl | bool | Read/Write | Gets or sets a flag indicating whether East Asian line-breaking rules are applied to the current paragraph. |
WordWrap | bool | Read/Write | If this property is false, Latin text in the middle of a word can be wrapped for the current paragraph. |
HangingPunctuation | bool | Read/Write | Gets or sets a flag indicating whether hanging punctuation is enabled for the current paragraph. |
Bidi | bool | Read/Write | Gets or sets whether this is a right-to-left paragraph. |
LeftIndent | double | Read/Write | Gets or sets the value (in points) that represents the left indent for paragraph. |
CharacterUnitLeftIndent | double | Read/Write | Gets or sets the left indent value (in characters) for the specified paragraphs. |
RightIndent | double | Read/Write | Gets or sets the value (in points) that represents the right indent for paragraph. |
CharacterUnitRightIndent | double | Read/Write | Gets or sets the right indent value (in characters) for the specified paragraphs. |
FirstLineIndent | double | Read/Write | Gets or sets the value (in points) for a first line or hanging indent. |
CharacterUnitFirstLineIndent | double | Read/Write | Gets or sets the value (in characters) for the first-line or hanging indent. |
SpaceBeforeAuto | bool | Read/Write | True if the amount of spacing before the paragraph is set automatically. |
SpaceAfterAuto | bool | Read/Write | True if the amount of spacing after the paragraph is set automatically. |
SpaceBefore | double | Read/Write | Gets or sets the amount of spacing (in points) before the paragraph. |
LineUnitBefore | double | Read/Write | Gets or sets the amount of spacing (in gridlines) before the paragraphs. |
SpaceAfter | double | Read/Write | Gets or sets the amount of spacing (in points) after the paragraph. |
LineUnitAfter | double | Read/Write | Gets or sets the amount of spacing (in gridlines) after the paragraphs. |
LineSpacingRule | LineSpacingRule | Read/Write | Gets or sets the line spacing for the paragraph. |
LineSpacing | double | Read/Write | Gets or sets the line spacing (in points) for the paragraph. |
MirrorIndents | bool | Read/Write | Gets or sets a flag indicating whether the left and right indents are of the same width. |
IsHeading | bool | Read | True when the paragraph style is one of the built-in Heading styles. |
IsListItem | bool | Read | True when the paragraph is an item in a bulleted or numbered list. |
OutlineLevel | OutlineLevel | Read/Write | Specifies the outline level of the paragraph in the document. |
LinesToDrop | int | Read/Write | Gets or sets the number of lines of the paragraph text used to calculate the drop cap height. |
DropCapPosition | DropCapPosition | Read/Write | Gets or sets the position for a drop cap text. |
Shading | Shading | Read | Returns a Shading object that refers to the shading formatting for the paragraph. |
Borders | BorderCollection | Read | Gets collection of borders of the paragraph. |
Style | Style | Read/Write | Gets or sets the paragraph style applied to this formatting. |
StyleName | string | Read/Write | Gets or sets the name of the paragraph style applied to this formatting. |
StyleIdentifier | StyleIdentifier | Read/Write | Gets or sets the locale independent style identifier of the paragraph style applied to this formatting. |
SnapToGrid | bool | Read/Write | Specifies whether the current paragraph should use the document grid lines per page settings when laying out the contents in the paragraph. |
TabStops | TabStopCollection | Read | Gets the collection of custom tab stops defined for this object. |
Methods
| Signature | Description |
|---|---|
ClearFormatting() | Resets to default paragraph formatting. |