Version

Virtualization

Please note that this control has been retired and is now obsolete to the XamDataGrid control, and as such, we recommend migrating to that control. It will not be receiving any new features, bug fixes, or support going forward. For help or questions on migrating your codebase to the XamDataGrid, please contact support.

The xamGrid™ control virtualizes UIElements for rows and cells to reduce memory usage and increase performance. To the end users, cells and rows appear as if they are always there; however, the visual elements are only created when they are in view. This process is essential for performance when your data set is large and it is infeasible to display the entire set of rows and cells in the control.

Reusing Elements

The xamGrid control initially creates twice the amount of rows and cells that are in view and reuses them when your end users scroll vertically or horizontally. Only cells of the same column type can be reused. For example, cells of a TextColumn object are recycled across text columns only and cells of a CheckboxColumn object are recycled across checkbox columns.

Disabling Virtualization

Virtualization is always on when you set the Height and Width properties of xamGrid or its containing element. If xamGrid does not have a width set, that is, if the control does not have a width and its parent container allows its width to be infinite then xamGrid will not virtualize cells during horizontal scrolling. An example is if xamGrid was inside a horizontal Stack Panel or a Scroll Viewer. Similarly, if the control has no height, such as when it is in a vertical Stack Panel or Scroll Viewer with no height, xamGrid will not virtualize cells and rows during vertical scrolling.

Effects of Virtualization

Since virtualization only creates UIElements that are in view, a row or cell may not have a content control attached to it. Therefore, you should avoid accessing properties of a cell or row’s content control; instead, use styles for customization.

Related Topics