Spire.Presentation is a professional PowerPoint® compatible library that enables developers to create, read, write, modify, convert and Print PowerPoint documents. Get free and professional technical support for Spire.Presentation for .NET, Java, Android, C++, Python.

Tue Feb 02, 2016 1:38 pm

Hello support,

I want my text anchor to top of rectangle box.
I try below declaration but explicit conversion exists and I don’t know how to do it.

TextParagraph contentParaESFR = textShapeESFR.TextFrame.Paragraphs[0];
contentParaESFR.FirstTextRange.Fill.FillType = FillFormatType.Solid;
contentParaESFR.FirstTextRange.Fill.SolidColor.Color = Color.White;
contentParaESFR.Alignment = TextAlignmentType.Left;
contentParaESFR.Alignment = TextAnchorType.Top; <--- explicite convertion error

Can you recommend how to do it?

Thanks,

Pedro

pedro.olo
 
Posts: 3
Joined: Fri Jan 22, 2016 3:52 pm

Tue Feb 02, 2016 9:45 pm

Try setting textShapeESFR.TextFrame.AnchoringType to TextAnchorType.Top.

sparticus1701
 
Posts: 5
Joined: Fri Jun 27, 2014 1:18 pm

Wed Feb 03, 2016 2:30 am

Thanks for your postings.
sparticus1701 sharing code is right. Pedro, please use
Code: Select all
textShapeESFR.TextFrame.AnchoringType = TextAnchorType.Top;


Best Regards,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 2774
Joined: Wed Jun 27, 2012 8:50 am

Return to Spire.Presentation