# Selection.ParagraphFormat Property

> Gets or sets the formatting attributes of the selected paragraphs. The property's value is an object of the type ParagraphFormat.

- **Product:** TX Text Control .NET for WPF
- **Section:** Reference
- **Kind:** Property
- **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
- **Path:** TX Text Control .NET for WPF > Reference > TXTextControl > Selection.ParagraphFormat Property
- **573 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/selection/paragraphformat-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/selection/paragraphformat-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/selection/paragraphformat-property/llms-full.txt

---

### Description

Gets or sets the formatting attributes of the selected paragraphs. The property's value is an object of the type [ParagraphFormat](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/paragraphformat/llms-full.txt).

### Syntax

```csharp
public ParagraphFormat ParagraphFormat { get; set; }
```

```vbnet
Public Property ParagraphFormat As ParagraphFormat
```

### Examples

The following example formats the heading of a short document by using `Selection.ParagraphFormat`.

```csharp
textControl.Text = "Quarterly results\nRevenue increased by 12%.";
textControl.Select(0, 17);
Selection selection = textControl.Selection;

selection.ParagraphFormat = new ParagraphFormat();
if (selection.ParagraphFormat != null)
{
    Console.WriteLine("Selection: Paragraph Format is available.");
}
```

```vbnet
textControl.Text = "Quarterly results" & vbCrLf & "Revenue increased by 12%."
textControl.Select(0, 17)
Dim selection As Selection = textControl.Selection

selection.ParagraphFormat = New ParagraphFormat()
If selection.ParagraphFormat IsNot Nothing Then
    Console.WriteLine("Selection: Paragraph Format is available.")
End If
```

### Limitations

Runtime only.

---

## Nearby

- **Previous:** [Selection.Load Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/selection/load-method/llms-full.txt)
- **Next:** [Selection.RemoveFormatting Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/selection/removeformatting-method/llms-full.txt)
