Shape
内容
[
隐藏
]Shape(Presentation, ForEachShapeCallback)
迭代每个Shape
在Presentation
中。 形状将在所有类型的幻灯片中迭代 -Slide
,MasterSlide
和LayoutSlide
public static void Shape(Presentation pres, ForEachShapeCallback forEachShape)
范围 | 类型 | 描述 |
---|---|---|
pres | Presentation | 表示迭代布局形状 |
forEachShape | ForEachShapeCallback | 将为每个形状调用的回调 |
例子
using (Presentation pres = new Presentation("pres.pptx"))
{
ForEach.Shape(pres, (shape, slide, index) =>
{
System.Console.WriteLine($"{shape.Name}, index: {index}");
});
}
也可以看看
- class Presentation
- delegate ForEachShapeCallback
- class ForEach
- 命名空间 Aspose.Slides.LowCode
- 部件 Aspose.Slides
Shape(BaseSlide, ForEachShapeCallback)
迭代每个Shape
在BaseSlide
中。 BaseSlide
是ForEachSlideCallback),MasterSlide
和LayoutSlide
public static void Shape(BaseSlide baseSlide, ForEachShapeCallback forEachShape)
范围 | 类型 | 描述 |
---|---|---|
baseSlide | BaseSlide | 滑动以迭代布局形状 |
forEachShape | ForEachShapeCallback | 将被调用的回调每个形状 |
例子
(Presentation pres = new Presentation("pres.pptx"))
{
ForEach.Slide(pres, (slide, index) =>
{
ForEach.Shape(slide, (shape, baseSlide, shapeIndex) =>
{
System.Console.WriteLine($"{shape.Name}, index: {shapeIndex}");
});
});
}
也可以看看
- class BaseSlide
- delegate ForEachShapeCallback
- class ForEach
- 命名空间 Aspose.Slides.LowCode
- 部件 Aspose.Slides