Slides rectangle text positioning

I want the text within a rectangle to appear starting at the top left corner. my problem is to get it to align to the top. the code that follows positions the text along the left hand side but in the middle vertically. I want it at the top. sort of at the (0,0) coordinates. the following code creates center/left, I want top/left. any thoughts?

thanks in advance.

IAutoShape generalInfo = slide.Shapes.AddAutoShape(ShapeType.Rectangle, leftMargin, topMargin, columnWidth, rowHeight);

generalInfo.FillFormat.FillType = FillType.Solid;

generalInfo.FillFormat.SolidFillColor.Color = Color.Transparent;

ITextFrame gitf = generalInfo.AddTextFrame("hello aspose");

gitf.Paragraphs[0].Portions[0].PortionFormat.FontBold = NullableBool.True;

gitf.Paragraphs[0].Portions[0].PortionFormat.FontUnderline = TextUnderlineType.Single;

gitf.Paragraphs[0].ParagraphFormat.Alignment = TextAlignment.Left;

Hi,


Thanks for inquiring Aspose.Slides.

I have observed your requirements and like to share that you need to set the Anchoring Type for the text. You can please try adding the following statement in your code to serve the purpose.

generalInfo.TextFrame.TextFrameFormat.AnchoringType = TextAnchorType.Top;


Many Thanks,