TextShape HorizontalAlign

Gets or sets the horizontal alignment of the text inside the text box. The allowable values are Left, Center, and Right.

public TextHorizontalAlign HorizontalAlign {get;Set}

 

Return value

TextHorizontalAlign Horizontal alignment of the text

 

Example

Copy
TextShape textShape = new TextShape();

textShape.AddText("Sample text Sample text", "Arial", FontStyle.Regular, 10f, 1f);
textShape.TextBoxHeight = 20;
textShape.TextBoxWidth = 60;
textShape.DotDurationMicroseconds = 2;
textShape.Angle = 30;

textShape.HorizontalAlign = TextHorizontalAlign.Left;

textShape.VerticalAlign = TextVerticalAlign.Center;
   

vectorImage.AddText(textShape);