IModernComment

IModernComment 接口

表示幻灯片上的评论。

public interface IModernComment : IComment

属性

名称描述
AsIComment { get; }允许获取基础 IComment 接口。只读 IComment
Shape { get; }返回与评论相关联的形状。只读 IShape
Status { get; set; }返回或设置评论的状态。读写 ModernCommentStatus
TextSelectionLength { get; set; }如果评论与自动形状相关联,返回或设置文本框中的文本选择长度。读写 Int32。
TextSelectionStart { get; set; }如果评论与自动形状相关联,返回或设置文本框中的文本选择起始位置。读写 Int32。

示例

[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);
}

另请参见