# ParagraphCollection.GetItem Method

> Gets a particular paragraph from the collection.

- **Product:** TX Text Control .NET for WPF
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 15.0
- **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 > ParagraphCollection.GetItem Method
- **761 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/paragraphcollection/getitem-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/paragraphcollection/getitem-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/paragraphcollection/getitem-method/llms-full.txt

---

### Description

Gets a particular paragraph from the collection.

### Syntax

#### GetItem(Point)

Gets the paragraph at a certain geometrical position.

```csharp
public Paragraph GetItem(Point location);
```

```vbnet
Public Function GetItem(location As Point) As Paragraph
```

| Parameter | Description |
|---|---|
| location | Specifies the paragraph's location. The point must be specified in pixels with an origin at the top left corner of the control. |

#### GetItem(int)

Gets the paragraph at a certain text input position.

```csharp
public Paragraph GetItem(int textPosition);
```

```vbnet
Public Function GetItem(textPosition As Integer) As Paragraph
```

| Parameter | Description |
|---|---|
| textPosition | Specifies a zero-based text position. |

### Return Value

The return value is null, if a paragraph could not be found. Otherwise, it is an object of the type Paragraph.

### Examples

The following example works with paragraphs in the current document by using `ParagraphCollection.get_Item`.

```csharp
ParagraphCollection paragraphCollection = textControl.Paragraphs;
textControl.Text = "Quarterly results\nRevenue increased by 12%.";

Paragraph result = paragraphCollection.GetItem(new System.Drawing.Point(20, 20));
result?.Select();
```

```vbnet
Dim paragraphCollection As ParagraphCollection = textControl.Paragraphs
textControl.Text = "Quarterly results" & vbCrLf & "Revenue increased by 12%."

Dim result As Paragraph = paragraphCollection.GetItem(New System.Drawing.Point(20, 20))
If result IsNot Nothing Then result.Select()
```

---

## Nearby

- **Previous:** [ParagraphCollection.GetEnumerator Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/paragraphcollection/getenumerator-method/llms-full.txt)
- **Next:** [ParagraphCollection.Item Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/paragraphcollection/item-property/llms-full.txt)
