# ParagraphStyle Class

> The ParagraphStyle class defines a formatting style for paragraphs. In addition to the properties described here, it inherits all properties and methods of the FormattingStyle class.

- **Product:** TX Text Control .NET for WPF
- **Section:** Reference
- **Kind:** Class
- **Introduced:** 10.1
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.WPF.SDK` (assembly `TXTextControl.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.dll` from the setup
- **Inherits:** `TXTextControl.FormattingStyle`
- **Path:** TX Text Control .NET for WPF > Reference > TXTextControl > ParagraphStyle Class
- **2380 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/paragraphstyle/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/paragraphstyle/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/paragraphstyle/llms-full.txt

---

### Description

The ParagraphStyle class defines a formatting style for paragraphs. In addition to the properties described here, it inherits all properties and methods of the [FormattingStyle](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/formattingstyle/llms-full.txt) class.

### Syntax

```csharp
public sealed class ParagraphStyle : FormattingStyle
```

```vbnet
Public NotInheritable Class ParagraphStyle
    Inherits FormattingStyle
```

### Examples

The following example shows how to add and apply a ParagraphStyle.

```csharp
textControl1.Text = "TX Text Control";

TXTextControl.ParagraphStyle par = new TXTextControl.ParagraphStyle("CenterBold");
par.Bold = true;
par.ParagraphFormat.Alignment = TXTextControl.HorizontalAlignment.Center;
textControl1.ParagraphStyles.Add(par);

textControl1.Select(0,0);
textControl1.Selection.FormattingStyle = "CenterBold";
```

```vbnet
TextControl1.Text = "TX Text Control"

Dim par As TXTextControl.ParagraphStyle = New TXTextControl.ParagraphStyle("CenterBold")
par.Bold = True
par.ParagraphFormat.Alignment = TXTextControl.HorizontalAlignment.Center
TextControl1.ParagraphStyles.Add(par)

TextControl1.Select(0, 0)
TextControl1.Selection.FormattingStyle = "CenterBold"
```

The following example creates and configures a reusable paragraph style for the document.

```csharp
ParagraphStyle paragraphStyle = new("ReportHeading");
textControl.ParagraphStyles.Add(paragraphStyle);
```

```vbnet
Dim paragraphStyle As New ParagraphStyle("ReportHeading")
textControl.ParagraphStyles.Add(paragraphStyle)
```

---

## In This Section

- [ParagraphStyle Constructor](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/paragraphstyle/constructor/llms-full.txt): Creates a new instance of the ParagraphStyle class.
- [ParagraphStyle.FollowingStyle Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/paragraphstyle/followingstyle-property/llms-full.txt): Gets or sets the name of the style that TextControl automatically selects for the following paragraph after the user has pressed the ENTER key.
- [ParagraphStyle.ListFormat Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/paragraphstyle/listformat-property/llms-full.txt): Gets or sets the style's bulleted or numbered list and/or its formatting attributes. The property's value is an object of the type ListFormat.
- [ParagraphStyle.ParagraphFormat Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/paragraphstyle/paragraphformat-property/llms-full.txt): Gets or sets the style's paragraph attributes. The property's value is an object of the type ParagraphFormat.

---

## Nearby

- **Previous:** [ParagraphFormat.WidowOrphanLines Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/paragraphformat/widoworphanlines-property/llms-full.txt)
- **Next:** [ParagraphStyle Constructor](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/paragraphstyle/constructor/llms-full.txt)
