## ParagraphFormat class

Represents all the formatting for a paragraph.

To learn more, visit the [Working with Paragraphs](https://docs.aspose.com/words/net/working-with-paragraphs/) documentation article.

```csharp
public class ParagraphFormat
```

## Properties

| Name | Description |
| --- | --- |
| [AddSpaceBetweenFarEastAndAlpha](../../aspose.words/paragraphformat/addspacebetweenfareastandalpha/) { get; set; } | 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](../../aspose.words/paragraphformat/addspacebetweenfareastanddigit/) { get; set; } | 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. |
| [Alignment](../../aspose.words/paragraphformat/alignment/) { get; set; } | Gets or sets text alignment for the paragraph. |
| [BaselineAlignment](../../aspose.words/paragraphformat/baselinealignment/) { get; set; } | Gets or sets fonts vertical position on a line. |
| [Bidi](../../aspose.words/paragraphformat/bidi/) { get; set; } | Gets or sets whether this is a right-to-left paragraph. |
| [Borders](../../aspose.words/paragraphformat/borders/) { get; } | Gets collection of borders of the paragraph. |
| [CharacterUnitFirstLineIndent](../../aspose.words/paragraphformat/characterunitfirstlineindent/) { get; set; } | Gets or sets the value (in characters) for the first-line or hanging indent. |
| [CharacterUnitLeftIndent](../../aspose.words/paragraphformat/characterunitleftindent/) { get; set; } | Gets or sets the left indent value (in characters) for the specified paragraphs. |
| [CharacterUnitRightIndent](../../aspose.words/paragraphformat/characterunitrightindent/) { get; set; } | Gets or sets the right indent value (in characters) for the specified paragraphs. |
| [DropCapPosition](../../aspose.words/paragraphformat/dropcapposition/) { get; set; } | Gets or sets the position for a drop cap text. |
| [FarEastLineBreakControl](../../aspose.words/paragraphformat/fareastlinebreakcontrol/) { get; set; } | Gets or sets a flag indicating whether East Asian line-breaking rules are applied to the current paragraph. |
| [FirstLineIndent](../../aspose.words/paragraphformat/firstlineindent/) { get; set; } | Gets or sets the value (in points) for a first line or hanging indent. |
| [HangingPunctuation](../../aspose.words/paragraphformat/hangingpunctuation/) { get; set; } | Gets or sets a flag indicating whether hanging punctuation is enabled for the current paragraph. |
| [IsHeading](../../aspose.words/paragraphformat/isheading/) { get; } | True when the paragraph style is one of the built-in Heading styles. |
| [IsListItem](../../aspose.words/paragraphformat/islistitem/) { get; } | True when the paragraph is an item in a bulleted or numbered list. |
| [KeepTogether](../../aspose.words/paragraphformat/keeptogether/) { get; set; } | True if all lines in the paragraph are to remain on the same page. |
| [KeepWithNext](../../aspose.words/paragraphformat/keepwithnext/) { get; set; } | True if the paragraph is to remains on the same page as the paragraph that follows it. |
| [LeftIndent](../../aspose.words/paragraphformat/leftindent/) { get; set; } | Gets or sets the value (in points) that represents the left indent for paragraph. |
| [LineSpacing](../../aspose.words/paragraphformat/linespacing/) { get; set; } | Gets or sets the line spacing (in points) for the paragraph. |
| [LineSpacingRule](../../aspose.words/paragraphformat/linespacingrule/) { get; set; } | Gets or sets the line spacing for the paragraph. |
| [LinesToDrop](../../aspose.words/paragraphformat/linestodrop/) { get; set; } | Gets or sets the number of lines of the paragraph text used to calculate the drop cap height. |
| [LineUnitAfter](../../aspose.words/paragraphformat/lineunitafter/) { get; set; } | Gets or sets the amount of spacing (in gridlines) after the paragraphs. |
| [LineUnitBefore](../../aspose.words/paragraphformat/lineunitbefore/) { get; set; } | Gets or sets the amount of spacing (in gridlines) before the paragraphs. |
| [MirrorIndents](../../aspose.words/paragraphformat/mirrorindents/) { get; set; } | Gets or sets a flag indicating whether the left and right indents are of the same width. |
| [NoSpaceBetweenParagraphsOfSameStyle](../../aspose.words/paragraphformat/nospacebetweenparagraphsofsamestyle/) { get; set; } | When `true`, [`SpaceBefore`](./spacebefore/) and [`SpaceAfter`](./spaceafter/) will be ignored between the paragraphs of the same style. |
| [OutlineLevel](../../aspose.words/paragraphformat/outlinelevel/) { get; set; } | Specifies the outline level of the paragraph in the document. |
| [PageBreakBefore](../../aspose.words/paragraphformat/pagebreakbefore/) { get; set; } | True if a page break is forced before the paragraph. |
| [RightIndent](../../aspose.words/paragraphformat/rightindent/) { get; set; } | Gets or sets the value (in points) that represents the right indent for paragraph. |
| [Shading](../../aspose.words/paragraphformat/shading/) { get; } | Returns a [`Shading`](../shading/) object that refers to the shading formatting for the paragraph. |
| [SnapToGrid](../../aspose.words/paragraphformat/snaptogrid/) { get; set; } | Specifies whether the current paragraph should use the document grid lines per page settings when laying out the contents in the paragraph. |
| [SpaceAfter](../../aspose.words/paragraphformat/spaceafter/) { get; set; } | Gets or sets the amount of spacing (in points) after the paragraph. |
| [SpaceAfterAuto](../../aspose.words/paragraphformat/spaceafterauto/) { get; set; } | True if the amount of spacing after the paragraph is set automatically. |
| [SpaceBefore](../../aspose.words/paragraphformat/spacebefore/) { get; set; } | Gets or sets the amount of spacing (in points) before the paragraph. |
| [SpaceBeforeAuto](../../aspose.words/paragraphformat/spacebeforeauto/) { get; set; } | True if the amount of spacing before the paragraph is set automatically. |
| [Style](../../aspose.words/paragraphformat/style/) { get; set; } | Gets or sets the paragraph style applied to this formatting. |
| [StyleIdentifier](../../aspose.words/paragraphformat/styleidentifier/) { get; set; } | Gets or sets the locale independent style identifier of the paragraph style applied to this formatting. |
| [StyleName](../../aspose.words/paragraphformat/stylename/) { get; set; } | Gets or sets the name of the paragraph style applied to this formatting. |
| [SuppressAutoHyphens](../../aspose.words/paragraphformat/suppressautohyphens/) { get; set; } | Specifies whether the current paragraph should be exempted from any hyphenation which is applied in the document settings. |
| [SuppressLineNumbers](../../aspose.words/paragraphformat/suppresslinenumbers/) { get; set; } | Specifies whether the current paragraph's lines should be exempted from line numbering which is applied in the parent section. |
| [TabStops](../../aspose.words/paragraphformat/tabstops/) { get; } | Gets the collection of custom tab stops defined for this object. |
| [WidowControl](../../aspose.words/paragraphformat/widowcontrol/) { get; set; } | True if the first and last lines in the paragraph are to remain on the same page as the rest of the paragraph. |
| [WordWrap](../../aspose.words/paragraphformat/wordwrap/) { get; set; } | If this property is `false`, Latin text in the middle of a word can be wrapped for the current paragraph. Otherwise Latin text is wrapped by whole words. |

## Methods

| Name | Description |
| --- | --- |
| [ClearFormatting](../../aspose.words/paragraphformat/clearformatting/)() | Resets to default paragraph formatting. |

## Examples

Shows how to construct an Aspose.Words document by hand.

```csharp
Document doc = new Document();

// A blank document contains one section, one body and one paragraph.
// Call the "RemoveAllChildren" method to remove all those nodes,
// and end up with a document node with no children.
doc.RemoveAllChildren();

// This document now has no composite child nodes that we can add content to.
// If we wish to edit it, we will need to repopulate its node collection.
// First, create a new section, and then append it as a child to the root document node.
Section section = new Section(doc);
doc.AppendChild(section);

// Set some page setup properties for the section.
section.PageSetup.SectionStart = SectionStart.NewPage;
section.PageSetup.PaperSize = PaperSize.Letter;

// A section needs a body, which will contain and display all its contents
// on the page between the section's header and footer.
Body body = new Body(doc);
section.AppendChild(body);

// Create a paragraph, set some formatting properties, and then append it as a child to the body.
Paragraph para = new Paragraph(doc);

para.ParagraphFormat.StyleName = "Heading 1";
para.ParagraphFormat.Alignment = ParagraphAlignment.Center;

body.AppendChild(para);

// Finally, add some content to do the document. Create a run,
// set its appearance and contents, and then append it as a child to the paragraph.
Run run = new Run(doc);
run.Text = "Hello World!";
run.Font.Color = Color.Red;
para.AppendChild(run);

Assert.That(doc.GetText().Trim(), Is.EqualTo("Hello World!"));

doc.Save(ArtifactsDir + "Section.CreateManually.docx");
```

### See Also

* namespace [Aspose.Words](../../aspose.words/)
* assembly [Aspose.Words](../../)
