Version

ItemSize Property

Gets/sets the size of the area in which an item is displayed.
Syntax
'Declaration
 
Public Property ItemSize As Size
public Size ItemSize {get; set;}
Remarks

The ImageSize property determines the size at which images are displayed; the item's value (along with the values of its sub-items) are displayed using the remaining space. The ItemSize property can be used to increase the amount of space available in which to display the item and sub-item values.

The UltraListView.ItemSizeResolved property returns the resolved value of the ItemSize property.

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