Working with Text Boxes
Format Text in the Visio Shape’s Text Block Section
Aspose.Diagram API allows developers to control the text direction, alignment, margins, background color, background color transparency, and default tab stop position of text in a shape’s text block. They can interact with these properties programmatically using Aspose.Diagram for .NET.
Set the direction, alignment, margins, background color, transparency, and default tab stop position of the text in a Shape’s Text Block
The text block format section of the Visio shapesheet contains the formatting information. The Shape class offers TextBlock property to get or set the visual appearance of the shape’s text.
Format Text Programming Sample
The following piece of code sets direction, alignment, margins, background color, background color transparency, and default tab stop position of the orientation angle and position of the shape’s text at the top.
Rotate and Set Position of the Visio Shape Text
Aspose.Diagram API allows developers to adjust the text position and also rotate text on the Visio Shape. To accomplish this task, the text transforms section on the shapesheet provides TxtPin, TxtLocPin, TxtWidth and TxtHeight properties. Developers can interact with these properties programmatically using Aspose.Diagram for .NET.
Rotate and Set Position of the Shape Text
The text transforms section contains the positional information about a shape’s text block. Below examples show how to adjust shape text positions and orientation angle.
Set shape’s text position at the top
The following piece of code sets orientation angle and position of the shape’s text at the top.
Set shape’s text position at the bottom
The following piece of code sets orientation angle and position of the shape’s text at the bottom.
Set shape’s text position at the left
The following piece of code sets orientation angle and position of the shape’s text at the left.
Set shape’s text position at the right
The following piece of code sets orientation angle and position of the shape’s text at the right.