Version

AutoFit Property

Gets/sets whether the cells and labels will be sized to exactly without the need to scroll.
Syntax
'Declaration
 
Public Property AutoFit As Nullable(Of Boolean)
public Nullable<bool> AutoFit {get; set;}
Remarks

When AutoFit is set to a boolean value then the AutoFitResolved property returns that value. Otherwise when AutoFit is left to its default value - null (Nothing in VB) - the current View's ViewBase.DefaultAutoFit value is returned by AutoFitResolved.

When AutoFitResolved returns true, then for Views where the item size dictates the size available to the RecordPresenter the cells are sized to fit within the record in one or both dimensions based on the View's ViewBase.IsAutoFitHeightSupported and ViewBase.IsAutoFitWidthSupported properties.

For Views such as GridView all the records are constrained in one dimension based on its ViewSettings' GridViewSettings.Orientation. For example, when the Orientation is Vertical all RecordPresenters' widths are set to exactly fit within the control so there will never be a horizontal scrollbar. Likewise, if the Orientation is Horizontal the heights are set to exactly fit within the control so there will never be a vertical scrollbar.

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, 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