C# ListView Items Selection and Sizing
Kettic ListView WinForms Control provides the support of items selection and sizing. It is capable of selecting not only a single item but also multiple items in ListView control. The selection and sizing mechanism for ListView items make it easy to use the .NET component for Windows Forms project being deployed on other C#.NET applications. It is really easy to perform the selecting operations on the fly when the users exposed event for selecting items.
How to Set Items Selection for ListView
Kettic ListView .NET component allows the users to perform both a single item and multiple items selection operation in ListView. To set the selection operations for ListView control in C#.NET, we need to use the MultiSelect property of the ListView component. When we selected the ListView items, we can access the selected item through the SelectedItem property in the single selecting mode or in the multiple selecting mode from the SelectedItems collection of the Kettic ListView control in C# template projects.
How to Size ListView Items in C#
Kettic ListView provides the support of sizing items in ListView. The sizing operation is accomplished by using the DetailsView property to change the Height of the Item and using the Width property of the columns to change the width. The C# code below shows how to change the height of the items in ListView to 70pixels and set various widths for the columns in ListView for Windows Forms applications.
Moreover, we can change the items size by using the ItemSize property. To use this ItemSize property, we need to disable the FullRowSelect property in ViewType.ListView. The C# code below demonstrates that how to achieve this.
Additionally, the users can also change the item size for views by using the ItemSize property when disabling the properties, ApplyArbitraryItemWidth and ApplyArbitraryItemHeight. These two properties are used to adjust the size in different directions,
The following is the C# code that shows how to set the ApplyArbitraryItemWidth and ApplyArbitraryItemHeight properties to false and adjust the item size.
UI Controlsfor Windows Forms.NET WinForms UI Overview.NET WinForms UI Features.NET WinForms UI GuideC# WinForms UI DesignVB.NET WinForms UI Design
WinForms UI Controls