# CommentedText Class

> A CommentedText object represents a commented piece of text. A comment can be inserted with a built-in comment input control which can be opened through the context menu when a piece of text has been selected. Additionally, a comment can be inserted trough the CommentCollection.Add methods. All CommentedText objects are contained in the CommentCollection which can be obtained with the Comments property.

- **Product:** TX Text Control .NET for WPF
- **Section:** Reference
- **Kind:** Class
- **Introduced:** 30.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 > CommentedText Class
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/commentedtext/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/commentedtext/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/commentedtext/llms-full.txt

---

## On This Page

- [Description](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/commentedtext/#description)
- [Syntax](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/commentedtext/#syntax)
- [Examples](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/commentedtext/#examples)
- [Members](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/commentedtext/#members)

---

## In This Section

- [CommentedText.Active Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/commentedtext/active-property/llms.txt): Gets or sets a value specifying whether the comment is currently active or not. An inactive comment is not highlighted and is not retrieved through the CommentCollection.GetItem method. When the state changes from active to inactive or vise versa, a CommentStateChanged event occurs.
- [CommentedText.Comment Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/commentedtext/comment-property/llms.txt): Gets or sets a string which is the comment.
- [CommentedText Constructor](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/commentedtext/constructor/llms.txt): Initializes a new instance of the CommentedText class.
- [CommentedText.CreationTime Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/commentedtext/creationtime-property/llms.txt): Gets the date and time when the comment has been inserted. The time is a Coordinated Universal Time (UTC).
- [CommentedText.DefaultHighlightColor Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/commentedtext/defaulthighlightcolor-property/llms.txt): Gets the default highlight color for the commented text. This color is used when the commentator is unknown. When the commentator is the current user, the highlight color is red.
- [CommentedText.EditComment Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/commentedtext/editcomment-method/llms.txt): Opens a comment input control to edit the comment's text.
- [CommentedText.HighlightColor Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/commentedtext/highlightcolor-property/llms.txt): Gets or sets the highlight color for the commented text. If the highlight color is CommentedText.DefaultHighlightColor, the highlight color is set to a color depending on the user name. The current user is the first string set with the TextControl.UserNames property.
- [CommentedText.HighlightMode Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/commentedtext/highlightmode-property/llms.txt): Gets or sets a value indicating whether the commented text is highlighted.
- [CommentedText.ID Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/commentedtext/id-property/llms.txt): Gets or sets a user-defined identifier. It must be a one-based value. A value of zero indicates that the comment has no identifier.
- [CommentedText.Length Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/commentedtext/length-property/llms.txt): Gets the number of commented characters.
- [CommentedText.Number Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/commentedtext/number-property/llms.txt): Gets the comment's number. The first comment in the document has the number 1. The number is defined through the textflow. Commented text with a smaller start position has a smaller comment number.
- [CommentedText.RepliedComment Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/commentedtext/repliedcomment-property/llms.txt): Gets the comment for which this comment is a reply. When this comment is not a reply, null is returned.
- [CommentedText.Replies Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/commentedtext/replies-property/llms.txt): Gets all replies of this comment or null if there are no replies.
- [CommentedText.ReplyToComment Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/commentedtext/replytocomment-method/llms.txt): Opens a comment input control to reply to this comment.
- [CommentedText.Save Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/commentedtext/save-method/llms.txt): Saves the commented text with the specified format.
- [CommentedText.ScrollTo Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/commentedtext/scrollto-method/llms.txt): Sets the current input position to the first position of the commented text and scrolls it into the visible part of the document.
- [CommentedText.Select Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/commentedtext/select-method/llms.txt): Selects the commented part of the document.
- [CommentedText.Start Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/commentedtext/start-property/llms.txt): Gets the index (one-based) of the first commented character.
- [CommentedText.Text Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/commentedtext/text-property/llms.txt): Gets the commented text.
- [CommentedText.UserName Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/commentedtext/username-property/llms.txt): Gets the name of the user who has commented the document. This parameter can be null or an empty string to indicate, that an unknown user has made the comment.

---

## Nearby

- **Previous:** [CommentCollection.SyncRoot Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/commentcollection/syncroot-property/llms.txt)
- **Next:** [CommentedText.Active Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/commentedtext/active-property/llms.txt)
