| Visual Basic (Declaration) | |
|---|---|
Public Property View As UltraListViewStyle | |
| C# | |
|---|---|
public UltraListViewStyle View {get; set;} | |
The View property provides a way for the end developer to change the way items are presented to the end user.
The following table lists each setting for the View property, along with a brief description:
| Value | Description |
|---|---|
| Details | Items are displayed in a grid-like fashion; headers are displayed for the UltraListView.MainColumn and each visible member of the UltraListView.SubItemColumns collection, with the item's value being displayed under the MainColumn, and each UltraListViewSubItem value being displayed under the header of the corresponding UltraListViewSubItemColumn. |
| List | Items are displayed as an image, along with the item's UltraListViewItemBase.Text. Items are positioned from top to bottom, wrapping to a new column when the available vertical space is exhausted. Note: The UltraListView control can emulate a standard .NET ListBox control by setting the UltraListViewListSettings.MultiColumn property to false when the View property is set to 'List'. Sub-items are not displayed in the 'List' view. |
| Icons | Items are displayed as an image, along with the item's UltraListViewItemBase.Text underneath. The way items are positioned is dependent on the value of the UltraListViewIconicViewSettingsBase.Alignment property. Sub-items are not displayed in the 'Icons' view. |
| Tiles | Items are displayed as an image, along with the item's UltraListViewItemBase.Text to the right of the image. The way items are positioned is dependent on the value of the UltraListViewIconicViewSettingsBase.Alignment property. Sub-item values are displayed underneath the item's value in the 'Tiles' view. |
| Thumbnails | Items are displayed as an image in a large bordered square, along with the item's UltraListViewItemBase.Text underneath. The way items are positioned is dependent on the value of the UltraListViewIconicViewSettingsBase.Alignment property. Sub-item values are not displayed in the 'Thumbnails' view. |
Each setting for the View property has a corresponding property, exposed by the UltraListView control, which exposes the properties that apply to that view. For example, properties which apply to the 'Details' view appear under the UltraListView.ViewSettingsDetails property.
The following code sample demonstrates how the UltraListView control's ViewChanged event can be handled to receive a notification when the value of the 'View' property changes, and how this notification can be used to optimize the control's visual appearance for that particular view:
For an overview of how to handle events in Visual Basic or Visual C#, see Event Handlers in Visual Basic and Visual C#. For specific information and code examples illustrating how to consume events in your application, see Consuming Events in the .NET Framework Developer's Guide.
For an overview of how to handle events in Visual Basic or Visual C#, see Event Handlers in Visual Basic and Visual C#. For specific information and code examples illustrating how to consume events in your application, see Consuming Events in the .NET Framework Developer's Guide.
| Visual Basic | Copy Code |
|---|---|
Imports Infragistics.Win | |
| C# | Copy Code |
|---|---|
using Infragistics.Win; | |
