Class CommentAdv
Represents the CommentAdv class.
Implements
Inherited Members
Namespace: Syncfusion.UI.Xaml.RichTextBoxAdv
Assembly: Syncfusion.SfRichTextBoxAdv.UWP.dll
Syntax
public class CommentAdv : CommentCharacterAdv, INode
Examples
The following code example demonstrates how to add a comment.
<RichTextBoxAdv:ParagraphAdv>
<!-- Add any number of inlines. -->
<RichTextBoxAdv:CommentStartAdv CommentID="6" />
<RichTextBoxAdv:SpanAdv>Hello World.</RichTextBoxAdv:SpanAdv>
<!-- Add any number of inlines. -->
<RichTextBoxAdv:CommentEndAdv CommentID="6"/>
<!-- Add inlines for the paragragraph. -->
<!-- Adds the comment. -->
<RichTextBoxAdv:CommentAdv CommentID="6" Author="Peter" Initial="F">
<!-- Add the blocks of the comment. -->
<RichTextBoxAdv:ParagraphAdv>
<RichTextBoxAdv:SpanAdv>A comment.</RichTextBoxAdv:SpanAdv>
</RichTextBoxAdv:ParagraphAdv>
</RichTextBoxAdv:CommentAdv>
<!-- Add any number of inlines. -->
</RichTextBoxAdv:ParagraphAdv>
ParagraphAdv paragraph = new ParagraphAdv();
// Adds the comment start.
CommentStartAdv commentStart = new CommentStartAdv();
commentStart.CommentID = 6;
paragraph.Inlines.Add(commentStart);
// Adds the content to be commented.
SpanAdv span = new SpanAdv();
span.Text = "Hello world.";
paragraph.Inlines.Add(span);
// Adds the comment end.
CommentEndAdv commentEnd = new CommentEndAdv();
commentEnd.CommentID = 6;
paragraph.Inlines.Add(commentEnd);
// Adds the comment.
CommentAdv comment = new CommentAdv();
comment.CommentID = 6;
comment.Author = "Peter";
// Add the blocks of the comment.
ParagraphAdv commentParagraph = new ParagraphAdv();
SpanAdv commentSpan = new SpanAdv();
commentSpan.Text = "A Comment";
commentParagraph.Inlines.Add(commentSpan);
comment.Blocks.Add(paragraph);
paragraph.Inlines.Add(comment);
Dim paragraph As New ParagraphAdv()
' Adds the comment start.
Dim commentStart As New CommentStartAdv()
commentStart.CommentID = 6
paragraph.Inlines.Add(commentStart)
' Adds the content to be commented.
Dim span As New SpanAdv()
span.Text = "Hello world."
paragraph.Inlines.Add(span)
' Adds the comment end.
Dim commentEnd As New CommentEndAdv()
commentEnd.CommentID = 6
paragraph.Inlines.Add(commentEnd)
' Adds the comment.
Dim comment As New CommentAdv()
comment.CommentID = 6
comment.Author = "Peter"
comment.Initial = "F"
Dim commentParagraph As New ParagraphAdv()
Dim commentSpan As New SpanAdv()
commentSpan.Text = "Hello world."
commentParagraph.Inlines.Add(commentSpan)
comment.Blocks.Add(commentParagraph);
paragraph.Inlines.Add(comment)
Constructors
CommentAdv()
Initializes a new instance of the CommentAdv class with current Windows.Foundation.DateTime as created time.
Declaration
public CommentAdv()
CommentAdv(Node)
Initializes a new instance of the CommentAdv class for the specified Node with current Windows.Foundation.DateTime as created time.
Declaration
public CommentAdv(Node owner)
Parameters
Type | Name | Description |
---|---|---|
Node | owner | The owner of the CommentAdv. The value can be null or an instance of ParagraphAdv. |
CommentAdv(Node, DateTime)
Initializes a new instance of the CommentAdv class for the specified Node with the specified Windows.Foundation.DateTime as created time.
Declaration
public CommentAdv(Node owner, DateTime date)
Parameters
Type | Name | Description |
---|---|---|
Node | owner | The owner of the CommentAdv. The value can be null or an instance of ParagraphAdv. |
System.DateTime | date | The Windows.Foundation.DateTime instance representing the created date and time of the CommentAdv. |
CommentAdv(DateTime)
Initializes a new instance of the CommentAdv class with the specified Windows.Foundation.DateTime as created time.
Declaration
public CommentAdv(DateTime date)
Parameters
Type | Name | Description |
---|---|---|
System.DateTime | date | The Windows.Foundation.DateTime instance representing the created date and time of the CommentAdv. |
Fields
AuthorProperty
Identifies the Author dependency property.
Declaration
public static readonly DependencyProperty AuthorProperty
Field Value
Type | Description |
---|---|
Windows.UI.Xaml.DependencyProperty | The identifier for the Author dependency property. |
InitialProperty
Identifies the Initial dependency property.
Declaration
public static readonly DependencyProperty InitialProperty
Field Value
Type | Description |
---|---|
Windows.UI.Xaml.DependencyProperty | The identifier for the Initial dependency property. |
Properties
Author
Gets or sets the author of the CommentAdv.
Declaration
public string Author { get; set; }
Property Value
Type | Description |
---|---|
System.String | The author of the CommentAdv. |
Blocks
Gets the BlockAdvCollection of the CommentAdv.
Declaration
public BlockAdvCollection Blocks { get; }
Property Value
Type | Description |
---|---|
BlockAdvCollection | The BlockAdvCollection of the CommentAdv. |
Date
Gets the created Windows.Foundation.DateTime of the CommentAdv.
Declaration
public DateTime Date { get; }
Property Value
Type | Description |
---|---|
System.DateTime | The created Windows.Foundation.DateTime of the CommentAdv. |
Initial
Gets or sets the author's initial of the CommentAdv.
Declaration
public string Initial { get; set; }
Property Value
Type | Description |
---|---|
System.String | The author's initial of the CommentAdv. |
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException | The length of the initial must be less than 10 symbols. |