textbox.Layout.Transform.Rotation = 90; will rotate the entire TextBox around the centerpoint vs rotation of just the text inside the textbox. I was looking for a way to rotate only the text, like how Microsoft Word does it. If it is not possible to only rotate text in a TextBox, I will code the Transform.Rotation and offset the layout to make it appear in the position I want it.
For the “property is not accessible”, I was not sure how to rotate just Text inside the TextBox, so I created what I wanted in Microsoft Word. I then opened it with
var doc = DocumentModel.Load("rotated.docx"); to see what I should be doing to make it appear the way I want. I set a breakpoint and used a watch window to drill down into the DocumentModel to find the TextBox object.
When inspecting the TextBox object, the Layout does not have a Transform applied to it. The TextBoxFormat in the watch windows has a Rotation value, but when looking at the class definition for TextBoxFormat it shows only 2 properties :
TextBox.TextBoxFormat.VerticalAlignment. So it appears that Microsoft Word has data values that are not present in the Gembox.Document API, but correctly renders when saving to a pdf.
Below is the screenshot of what I am talking about. The stuff in blue is the Layout, and the stuff in green is for the TextBoxFormat.