# ParagraphStyle Constructor

> Creates a new instance of the ParagraphStyle class.

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

---

### Description

Creates a new instance of the [ParagraphStyle](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/paragraphstyle/llms-full.txt) class.

### Syntax

#### ParagraphStyle(string)

Creates a new instance of the [ParagraphStyle](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/paragraphstyle/llms-full.txt) class based on the TextControl root style named \[Normal\].

```csharp
public ParagraphStyle(string name);
```

```vbnet
Public Sub New(name As String)
```

| Parameter | Description |
|---|---|
| name | Specifies the new style's name. |

#### ParagraphStyle(string, string)

Creates a new instance of the [ParagraphStyle](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/paragraphstyle/llms-full.txt) class based on the specified base style.

```csharp
public ParagraphStyle(string name, string baseStyle);
```

```vbnet
Public Sub New(name As String, baseStyle As String)
```

| Parameter | Description |
|---|---|
| name | Specifies the new style's name. |
| baseStyle | Specifies the name of the style the new style is based on. |

#### ParagraphStyle(ParagraphStyle)

Creates a new root style that has all attributes of the specified style.

```csharp
public ParagraphStyle(ParagraphStyle style);
```

```vbnet
Public Sub New(style As ParagraphStyle)
```

| Parameter | Description |
|---|---|
| style | Is a style the attributes of which are used to initialize the new style. |

### Examples

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)
```

---

## Nearby

- **Previous:** [ParagraphStyle Class](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/paragraphstyle/llms-full.txt)
- **Next:** [ParagraphStyle.FollowingStyle Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/paragraphstyle/followingstyle-property/llms-full.txt)
