The DataPresenterBase class exposes a defaultable Boolean AutoFit property. If AutoFit is not set, the view supplies an appropriate default value. For example, the Grid view defaults to False, while the Carousel view defaults to True.
The following example code shows how the AutoFit property is set in XAML:
<igDP:XamDataGrid AutoFit="True"/>
Note
|
Note
When the AutoFit property is set to True for views where the item size dictates the size available for each record (e.g., Carousel view), the cells are sized to fit within the record in one or both dimensions based on the View’s IsAutoFitHeightSupported and IsAutoFitWidthSupported properties.
|
For views such as the Grid view, all the records are constrained in one dimension based on its Orientation. For example, when the Orientation property is set to Vertical, all RecordPresenters' widths are set to fit exactly within the control, so there will never be a horizontal scroll bar. Likewise, if the Orientation property is set to Horizontal, the heights are set to fit exactly within the control so there will never be a vertical scroll bar.