I'm trying to align text inside cell to bottom, however cannot achieve that.
Please check my code snippet and screenshot (1st - is what i want, 2nd is what i get):
- Code: Select all
static void Main(string[] args)
{
var presentation = new Presentation();
var halfSize = (presentation.SlideSize.Size.Width / 2) - 40;
var columnWidth = halfSize / 4;
Double[] widths = new double[] { columnWidth, columnWidth, columnWidth, columnWidth };
Double[] heights = new double[] { 100, 30, 50 };
ITable table = presentation.Slides[0].Shapes.AppendTable(20, 80, widths, heights);
table.StylePreset = TableStylePreset.NoStyleTableGrid;
table.MergeCells(table[0, 0], table[1, 0], false);
table.MergeCells(table[0, 0], table[2, 0], false);
table.MergeCells(table[0, 0], table[3, 0], false);
table[0, 0].TextFrame.Text = "Void";
table[0, 0].TextFrame.Paragraphs[0].Alignment = TextAlignmentType.Center;
table[0, 0].TextFrame.Paragraphs[0].FirstTextRange.FontHeight = 28;
//This line seems not working
table[0, 0].TextFrame.AnchoringType = TextAnchorType.Bottom;
presentation.SaveToFile("D://test.pptx", FileFormat.Pptx2013);
Process.Start("D://test.pptx");
}