Shape
Contents
[
Hide
]Shape(Presentation, ForEachShapeCallback)
Iterate each Shape in the Presentation. Shapes will be iterated in all type of slides - Slide, MasterSlide and LayoutSlide
public static void Shape(Presentation pres, ForEachShapeCallback forEachShape)
| Parameter | Type | Description |
|---|---|---|
| pres | Presentation | Presentation to iterate layout shapes |
| forEachShape | ForEachShapeCallback | Callback that will be invoked for each shape |
Examples
using (Presentation pres = new Presentation("pres.pptx"))
{
ForEach.Shape(pres, (shape, slide, index) =>
{
System.Console.WriteLine($"{shape.Name}, index: {index}");
});
}
See Also
- class Presentation
- delegate ForEachShapeCallback
- class ForEach
- namespace Aspose.Slides.LowCode
- assembly Aspose.Slides
Shape(Presentation, bool, ForEachShapeCallback)
Iterate each Shape in the Presentation. Shapes will be iterated in all type of slides - Slide, MasterSlide, LayoutSlide and NotesSlide if needed.
public static void Shape(Presentation pres, bool includeNotes, ForEachShapeCallback forEachShape)
| Parameter | Type | Description |
|---|---|---|
| pres | Presentation | Presentation to iterate layout shapes |
| includeNotes | Boolean | Flag that indicates whether NotesSlides should be included in processing. |
| forEachShape | ForEachShapeCallback | Callback that will be invoked for each shape |
Examples
using (Presentation pres = new Presentation("pres.pptx"))
{
ForEach.Shape(pres, true, (shape, slide, index) =>
{
System.Console.WriteLine($"{shape.Name}, index: {index}");
});
}
See Also
- class Presentation
- delegate ForEachShapeCallback
- class ForEach
- namespace Aspose.Slides.LowCode
- assembly Aspose.Slides
Shape(BaseSlide, ForEachShapeCallback)
Iterate each Shape in the BaseSlide. BaseSlide is the base type for Slide, MasterSlide and LayoutSlide
public static void Shape(BaseSlide baseSlide, ForEachShapeCallback forEachShape)
| Parameter | Type | Description |
|---|---|---|
| baseSlide | BaseSlide | Slide to iterate layout shapes |
| forEachShape | ForEachShapeCallback | Callback that will be invoked for each shape |
Examples
(Presentation pres = new Presentation("pres.pptx"))
{
ForEach.Slide(pres, (slide, index) =>
{
ForEach.Shape(slide, (shape, baseSlide, shapeIndex) =>
{
System.Console.WriteLine($"{shape.Name}, index: {shapeIndex}");
});
});
}
See Also
- class BaseSlide
- delegate ForEachShapeCallback
- class ForEach
- namespace Aspose.Slides.LowCode
- assembly Aspose.Slides