Version

TextOrientationInfo Constructor

Creates a new TextOrientationInfo instance.
Syntax
'Declaration
 
Public Function New( _
   ByVal degrees As Integer, _
   ByVal flowDirection As TextFlowDirection _
)
public TextOrientationInfo( 
   int degrees,
   TextFlowDirection flowDirection
)

Parameters

degrees
The angle of rotation of the text, in degrees, counter-clockwise from the horizontal line.
flowDirection
The flow direction of the text.
Exceptions
ExceptionDescription
System.ComponentModel.InvalidEnumArgumentExceptionflowDirection is a value which is not defined in the TextFlowDirection enumeration.
System.NotSupportedExceptionflowDirection is Vertical and degrees is not 0.
System.ArgumentOutOfRangeExceptiondegrees is not in the range of -90 to 90 degrees inclusive.
Remarks

Note: If a vertical flow direction is specified, the value of the rotation angle must be 0 degrees. Rotating vertical flow text is not supported.

Example
The following code demonstrates how to specify different text orientations for various headers in a grid.

Imports Infragistics.Win
Imports Infragistics.Win.UltraWinGrid

Private Sub btnRotateHeaders_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnRotateHeaders.Click
    ' Set the default rotation of all column headers in the first band.
    Me.UltraGrid1.DisplayLayout.Bands(0).Override.ColumnHeaderTextOrientation = _
     TextOrientationInfo.Horizontal45Degrees

    ' Set a custom text orientation on the first column header in the first band.
    Me.UltraGrid1.DisplayLayout.Bands(0).Columns(0).Header.TextOrientation = _
     TextOrientationInfo.Vertical


    ' Show the first band's header and rotate the text 23 degrees
    Me.UltraGrid1.DisplayLayout.Bands(0).HeaderVisible = True
    Me.UltraGrid1.DisplayLayout.Bands(0).Header.TextOrientation = _
     New TextOrientationInfo(23, TextFlowDirection.Horizontal)


    ' Add both columns in a child band to a group.
    Dim group As UltraGridGroup = Me.UltraGrid1.DisplayLayout.Bands(1).Groups.Add()
    group.Header.Caption = "Group 1"
    group.Columns.Add(Me.UltraGrid1.DisplayLayout.Bands(1).Columns(0))
    group.Columns.Add(Me.UltraGrid1.DisplayLayout.Bands(1).Columns(1))

    ' Rotate all group headers in the grid 90 degrees.
    Me.UltraGrid1.DisplayLayout.Override.GroupHeaderTextOrientation = _
     TextOrientationInfo.Horizontal90Degrees
End Sub
using System.Windows.Forms;
using Infragistics.Win;
using Infragistics.Win.UltraWinGrid;

private void btnRotateHeaders_Click( object sender, EventArgs e )
{
	// Set the default rotation of all column headers in the first band.
	this.ultraGrid1.DisplayLayout.Bands[ 0 ].Override.ColumnHeaderTextOrientation = 
		TextOrientationInfo.Horizontal45Degrees;

	// Set a custom text orientation on the first column header in the first band.
	this.ultraGrid1.DisplayLayout.Bands[ 0 ].Columns[ 0 ].Header.TextOrientation = 
		TextOrientationInfo.Vertical;


	// Show the first band's header and rotate the text 23 degrees
	this.ultraGrid1.DisplayLayout.Bands[ 0 ].HeaderVisible = true;
	this.ultraGrid1.DisplayLayout.Bands[ 0 ].Header.TextOrientation = 
		new TextOrientationInfo( 23, TextFlowDirection.Horizontal );


	// Add both columns in a child band to a group.
	UltraGridGroup group = this.ultraGrid1.DisplayLayout.Bands[ 1 ].Groups.Add();
	group.Header.Caption = "Group 1";
	group.Columns.Add( this.ultraGrid1.DisplayLayout.Bands[ 1 ].Columns[ 0 ] );
	group.Columns.Add( this.ultraGrid1.DisplayLayout.Bands[ 1 ].Columns[ 1 ] );

	// Rotate all group headers in the grid 90 degrees.
	this.ultraGrid1.DisplayLayout.Override.GroupHeaderTextOrientation = 
		TextOrientationInfo.Horizontal90Degrees;
}
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, 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