| Visual Basic (Declaration) | |
|---|---|
Public Property AutoFitColumns As AutoFitColumns | |
| C# | |
|---|---|
public AutoFitColumns AutoFitColumns {get; set;} | |
When AutoFitColumns is set to true, no horizontal scrollbar appears, and the column widths are negotiated so that all columns fit horizontally inside the viewable area of the control. When a column is resized, either programmatically or by the end user, that column's actual width is preserved whenever possible in subsequent calculations. For example, if the width of the UltraListView.MainColumn is changed by the end user, that actual size is used for that column the next time the control is painted, and the widths of the remaining columns are scaled up or down depending on the available horizontal space. Note that this scaling will never reduce the width of a column to the point where it becomes inaccessible, i.e., a minimum width is enforced.
In the case where the UltraListViewColumnBase.PerformAutoResize(ColumnAutoSizeMode) is called on a column, and the resulting width is larger than the difference between the width of the control and the sum of the minimum widths of the remaining columns, the automatically calculated width is negotiated to a value that allows all remaining columns to be displayed at their minimum width.
| Visual Basic | Copy Code |
|---|---|
Imports Infragistics.Win | |
| C# | Copy Code |
|---|---|
using Infragistics.Win; | |
