ParagraphCollection
概述
ParagraphCollection 是 Aspose.Slides FOSS 中用于 .NET 的类。继承自:ISlideComponent,IParagraphCollection,IEnumerable<IParagraph>。
表示一组段落。
此类提供 9 个方法,用于在 .NET 程序中处理 ParagraphCollection 对象。可用的方法包括:Add、Clear、Contains、GetEnumerator、GetParagraphs、IndexOf、Insert、Remove、RemoveAt。在安装 Aspose.Slides FOSS for .NET 包后,所有公共成员对任何 .NET 应用程序均可访问。属性:AsIEnumerable、AsIPresentationComponent、AsISlideComponent、Count、IsReadOnly、Presentation,以及另外 1 项。
属性
| 名称 | 类型 | 访问 | 描述 |
|---|---|---|---|
Slide | IBaseSlide? | 读取 | 获取幻灯片。 |
Presentation | IPresentation? | 读取 | 获取演示文稿。 |
AsIPresentationComponent | IPresentationComponent | 读取 | 获取作为 i 演示组件的。 |
AsISlideComponent | ISlideComponent | 读取 | 获取 as i slide 组件。 |
AsIEnumerable | IEnumerable<IParagraph> | 读取 | 获取 as i enumerable。 |
Count | int | 读取 | 获取计数。 |
IsReadOnly | bool | 读取 | 获取是否只读。 |
方法
| 签名 | 描述 |
|---|---|
GetParagraphs() | 获取底层 XML 文本主体元素中的段落。 |
Add(value: IParagraph) | 将指定的 IParagraph 插入集合 |
Insert(index: int, value: IParagraph) | 在此 ParagraphCollection 实例上调用 Insert(index, value)。 |
Clear() | 在此 ParagraphCollection 实例上调用 Clear。 |
RemoveAt(index: int) | 删除指定索引处的段落 |
Remove(item: IParagraph) | 删除给定 IParagraph 的第一次出现 |
Contains(item: IParagraph) | 检查集合是否包含指定的 IParagraph |
IndexOf(item: IParagraph) | 返回给定 IParagraph 的从零开始的索引,若不存在则返回 -1 |
GetEnumerator() | 返回用于遍历段落的枚举器 |