Version

Alignment Property

Gets/sets whether items are laid out in a horizontal or vertical direction before wrapping to the next row or column.
Syntax
'Declaration
 
Public Property Alignment As ItemAlignment
public ItemAlignment Alignment {get; set;}
Example
The following code sample demonstrates how to use some of the properties of the UltraListViewIconicViewSettingsBase class.

Imports Infragistics.Win
Imports Infragistics.Win.UltraWinListView


    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        '	Set the TextAreaAlignment so that the item values appear on top of the image
        Me.ultraListView1.ViewSettingsIcons.TextAreaAlignment = TextAreaAlignment.Top

        '	Allow only 1 line of text to display the item's Value,
        '	so that icons are aligned vertically
        Me.ultraListView1.ViewSettingsIcons.MaxLines = 1

        '	Set the Alignment property of the ViewSettingsIcons to 'TopToBottom'
        Me.ultraListView1.ViewSettingsIcons.Alignment = ItemAlignment.TopToBottom

        '	Increase the width of the item size by 10 pixels
        Dim itemSize As Size = Me.ultraListView1.ItemSizeResolved
        itemSize.Width += 10
        Me.ultraListView1.ViewSettingsIcons.ItemSize = itemSize

        '	Add some vertical space between the icon rows
        Me.ultraListView1.ViewSettingsIcons.Spacing = New Size(1, 10)

	End Sub
using Infragistics.Win;
using Infragistics.Win.UltraWinListView;
using System.Diagnostics;

		private void Form1_Load(object sender, System.EventArgs e)
		{
				//	Set the TextAreaAlignment so that the item values appear on top of the image
				this.ultraListView1.ViewSettingsIcons.TextAreaAlignment = TextAreaAlignment.Top;

				//	Allow only 1 line of text to display the item's Value,
				//	so that icons are aligned vertically
				this.ultraListView1.ViewSettingsIcons.MaxLines = 1;

				//	Set the Alignment property of the ViewSettingsIcons to 'TopToBottom'
				this.ultraListView1.ViewSettingsIcons.Alignment = ItemAlignment.TopToBottom;

				//	Increase the width of the item size by 10 pixels
				Size itemSize = this.ultraListView1.ItemSizeResolved;
				itemSize.Width += 10;
				this.ultraListView1.ViewSettingsIcons.ItemSize = itemSize;

				//	Add some vertical space between the icon rows
				this.ultraListView1.ViewSettingsIcons.Spacing = new Size( 1, 10 );
		}
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