New to Telerik UI for WinForms? Start a free 30-day trial

Comment

Class

Stores a comment's author metadata and body document; a paired CommentRangeEnd associates it with a range in the main document.

Definition

Namespace:Telerik.WinForms.Documents.Model

Assembly:Telerik.WinControls.RichTextEditor.dll

Syntax:

C#
public class Comment : ChildDocumentContainer

Inheritance: objectChildDocumentContainerComment

Inherited Members ChildDocumentContainer.OnBodyChanging()ChildDocumentContainer.OnBodyChanged()ChildDocumentContainer.BodyChangingChildDocumentContainer.BodyChanged

Constructors

Creates a comment with an empty body document.

C#
public Comment()

Creates a comment using the supplied document as its body.

C#
public Comment(RadDocument body)
Parameters:bodyRadDocument

The document to use as the comment body; it must not be null.

Creates a comment by importing the supplied plain text into its body document.

C#
public Comment(string body)
Parameters:bodystring

Plain text to import as the comment body.

Properties

Gets or sets the author metadata exported with the comment.

C#
[XamlSerializable("")]
public string Author { get; set; }

Gets or sets the comment body. The setter rejects null and normalizes the assigned document for comment layout.

C#
[XamlSerializable]
public override RadDocument Body { get; set; }

Overrides: ChildDocumentContainer.Body

Empty bodies are measured, then configured for flow layout with zero default paragraph spacing, empty section margins and flow padding, and a 10-point font on the document style.

Gets or sets the comment identifier used by RTF import and export.

C#
[XamlSerializable("")]
public string Name { get; set; }

Methods

Creates a comment with the same name and author and a deep copy of the body without copying its styles.

C#
public Comment CreateDeepCopy()
Returns:

Comment

The copied comment.