Version

TextAlignment Property

Specifies the text horizontal alignment. Default is to base the text alignment on the HorizontalContentAlignment property settings.
Syntax
'Declaration
 
Public Property TextAlignment As TextAlignment
public TextAlignment TextAlignment {get; set;}
Example
The following code demonstrates various TextAlignment settings.

<igEditors:XamTextEditor x:Name="leftAlignTextEditor" TextAlignment="Left" Value="Left Aligned Text" />
        
<igEditors:XamTextEditor x:Name="centerAlignTextEditor" TextAlignment="Center" Value="Center Aligned Text" />
        
<igEditors:XamTextEditor x:Name="rightAlignTextEditor" TextAlignment="Right" Value="Right Aligned Text" />

<igEditors:XamTextEditor x:Name="justifyAlignTextEditor" 
        
TextAlignment="Justify" 
        
Width="100" Height="100"
        
TextWrapping="Wrap" 
      
Value="Right Aligned Text. Value has to wrap multiple lines for Justify alignment to have any effect."  /> 
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also