Hi all!
I'm stuck on a probably stupid thing. I use a Textframe to rotate a cell's value 90° counter clockwise. Now I need this textframe to be centered in its cell. I can't get it centered using the cells alignment property. Setting the alignment property works perfectly well when there's a paragraph in the cell but not when there's a textframe. Any hints for me? What am I missing?
This is what I'm doing:
Code:
...
Paragraph paragraph = new Paragraph();
paragraph.Format.Font.Color = Colors.Black;
paragraph.Format.Shading.Color = new Color(192 << 16 | 192 << 8 | 192);
paragraph.Format.Font.Bold = true;
paragraph.AddText(content);
....
// Unfortunately this doesn't have any impact
cell.Format.Alignment = ParagraphAlignment.Center;
TextFrame verticalContent = cell.AddTextFrame();
verticalContent.Orientation = TextOrientation.Upward;
verticalContent.MarginBottom = Unit.FromMillimeter(3);
verticalContent.Add(paragraph);
...
Thanks a lot!