How to Align a Table to the Center in a PowerPoint Presentation in C#?

Hi @mudassir.fayyaz ,
Is there an option to center-align a table, not the cells?

@abin.t,
Thank you for contacting support.

Using Aspose.Slides, you can align tables and any shapes in a PowerPoint presentation like this:

var slideSize = presentation.SlideSize.Size;

var shape = presentation.Slides[0].Shapes[0];

// Horizontal alignment.
shape.X = (slideSize.Width - shape.Width) / 2;

// Vertical alignment.
shape.Y = (slideSize.Height - shape.Height) / 2;
1 Like