# TextControl.Comments Property

> Gets a collection of all comments contained in the text part with the input focus. The property's value is an object of the type CommentCollection.

- **Product:** TX Text Control .NET for WPF
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 30.0
- **Namespace:** `TXTextControl.WPF`
- **Package:** `TXTextControl.TextControl.WPF.SDK` (assembly `TXTextControl.WPF.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.WPF.dll` from the setup
- **Path:** TX Text Control .NET for WPF > Reference > TXTextControl.WPF > TextControl.Comments Property
- **340 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/comments-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/comments-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/comments-property/llms-full.txt

---

### Description

Gets a collection of all comments contained in the text part with the input focus. The property's value is an object of the type [CommentCollection](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/commentcollection/llms-full.txt).

### Syntax

```csharp
public CommentCollection Comments { get; }
```

```vbnet
Public ReadOnly Property Comments As CommentCollection
```

### Examples

The following example iterates through the comments collection and processes each commented text.

```csharp
foreach (CommentedText commentedText in textControl.Comments)
{
    Console.WriteLine(commentedText.Active);
}
```

```vbnet
For Each commentedText As CommentedText In textControl.Comments
    Console.WriteLine(commentedText.Active)
Next
```

### Limitations

Read only.

---

## Nearby

- **Previous:** [TextControl.CommentHighlightMode Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/commenthighlightmode-property/llms-full.txt)
- **Next:** [TextControl.CommentStateChanged Event](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/commentstatechanged-event/llms-full.txt)
