# ParagraphStyleCollection Class

> An instance of the ParagraphStyleCollection class contains all paragraph formatting styles in the current document represented through objects of the type ParagraphStyle. A paragraph style is a formatting style that can be used to format blocks of text. The ParagraphStyleCollection class implements the IEnumerable and the ICollection interfaces. An instance of this class can be obtained with the TextControl.ParagraphStyles property.

- **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.FormattingStyleCollection`
- **Implements:** `System.Collections.ICollection`, `System.Collections.IEnumerable`
- **Path:** TX Text Control .NET for WPF > Reference > TXTextControl > ParagraphStyleCollection Class
- **982 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/paragraphstylecollection/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/paragraphstylecollection/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/paragraphstylecollection/llms-full.txt

---

### Description

An instance of the ParagraphStyleCollection class contains all paragraph formatting styles in the current document represented through objects of the type [ParagraphStyle](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/paragraphstyle/llms-full.txt). A paragraph style is a formatting style that can be used to format blocks of text. The ParagraphStyleCollection class implements the IEnumerable and the ICollection interfaces. An instance of this class can be obtained with the [TextControl.ParagraphStyles](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/paragraphstyles-property/llms-full.txt) property.

### Syntax

```csharp
public sealed class ParagraphStyleCollection : FormattingStyleCollection
```

```vbnet
Public NotInheritable Class ParagraphStyleCollection
    Inherits FormattingStyleCollection
```

### Examples

The following example works with paragraph styles in the current document.

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

```vbnet
Dim paragraphStyleCollection As ParagraphStyleCollection = textControl.ParagraphStyles
paragraphStyleCollection.Add(New ParagraphStyle("ReportHeading"))
```

---

## In This Section

- [ParagraphStyleCollection.Add Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/paragraphstylecollection/add-method/llms-full.txt): Adds to new formatting style to the current document.
- [ParagraphStyleCollection.CopyTo Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/paragraphstylecollection/copyto-method/llms-full.txt): Copies the elements of the collection to an array, starting at a particular index.
- [ParagraphStyleCollection.GetItem Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/paragraphstylecollection/getitem-method/llms-full.txt): Gets a particular style from the collection.

---

## Nearby

- **Previous:** [ParagraphStyle.ParagraphFormat Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/paragraphstyle/paragraphformat-property/llms-full.txt)
- **Next:** [ParagraphStyleCollection.Add Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/paragraphstylecollection/add-method/llms-full.txt)
