# ParagraphFormat.Frame Property

> Gets or sets a frame around the paragraph.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Property
- **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 > ParagraphFormat.Frame Property
- **780 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/paragraphformat/frame-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/paragraphformat/frame-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/paragraphformat/frame-property/llms-full.txt

---

### Description

Gets or sets a frame around the paragraph.

### Syntax

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

```vbnet
Public Property Frame As Frame
```

### Members

| Value | Description |
|---|---|
| None | The paragraph has no frame. |
| LeftLine | The paragraph has a left frame line. |
| RightLine | The paragraph has a right frame line. |
| TopLine | The paragraph has a frame line at the top. |
| BottomLine | The paragraph has frame line at the bottom. |
| Box | The paragraph has a complete frame. |
| MergedBox | The paragraph has a complete frame. If the following or the previous paragraph also has a frame, the frames are merged to a single frame. |

### Examples

The following example applies paragraph layout to selected report text by using `ParagraphFormat.Frame`.

```csharp
textControl.Text = "First item\nSecond item\nThird item";
textControl.Select(0, textControl.Text.Length);
ParagraphFormat paragraphFormat = textControl.Selection.ParagraphFormat;

paragraphFormat.Frame = Frame.LeftLine;
Console.WriteLine($"Frame used by Paragraph Format: {paragraphFormat.Frame}");

textControl.Selection.ParagraphFormat = paragraphFormat;
```

```vbnet
textControl.Text = "First item" & vbCrLf & "Second item" & vbCrLf & "Third item"
textControl.Select(0, textControl.Text.Length)
Dim paragraphFormat As ParagraphFormat = textControl.Selection.ParagraphFormat

paragraphFormat.Frame = Frame.LeftLine
Console.WriteLine($"Frame used by Paragraph Format: {paragraphFormat.Frame}")

textControl.Selection.ParagraphFormat = paragraphFormat
```

### Remarks

The property's default value is Frame.None.

The property returns its default value when the text selection contains multiple paragraphs with mixed frames. The [Selection.IsCommonValueSelected](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/selection/iscommonvalueselected-method/llms-full.txt) method can be used to check for mixed attributes.

---

## Nearby

- **Previous:** [ParagraphFormat.Direction Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/paragraphformat/direction-property/llms-full.txt)
- **Next:** [ParagraphFormat.FrameDistance Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/paragraphformat/framedistance-property/llms-full.txt)
