ModernComment

ModernComment class

Represents a comment on a slide.

public sealed class ModernComment : Comment, IModernComment

Properties

NameDescription
Author { get; }Returns the author of a comment. Read-only ICommentAuthor.
CreatedTime { get; set; }Returns or sets the time of a comment creation. Setting this property to MinValue means no comment time is set. Read/write DateTime.
ParentComment { get; set; }Gets or sets parent comment. Read/write IComment.
Position { get; set; }Returns or sets the position of a comment on a slide. Read/write PointF.
Shape { get; }Returns a shape associated with the comment. Read-only IShape.
Slide { get; }Returns or sets the parent slide of a comment. Read-only ISlide.
Status { get; set; }Gets or sets the status of the comment. Read/write ModernCommentStatus.
Text { get; set; }Returns or sets the plain text of a slide comment. Read/write String.
TextSelectionLength { get; set; }Gets or sets text selection length in text frame if the comment associated with AutoShape. Read/write Int32.
TextSelectionStart { get; set; }Gets or sets starting position of text selection in text frame if the comment associated with AutoShape. Read/write Int32.

Methods

NameDescription
Remove()Removes comment and all its replies from the parent collection.

Examples

[C#]
using (Presentation pres = new Presentation())
{
    ICommentAuthor newAuthor = pres.CommentAuthors.AddAuthor("Some Author", "SA");
    IModernComment modernComment = newAuthor.Comments.AddModernComment("This is modern comment", pres.Slides[0], null, new PointF(100, 100), DateTime.Now);

    pres.Save(outPptxFileName, SaveFormat.Pptx);
}

See Also