Xceed DataGrid for WPF supports various views, which determine the general layout of the data items in a grid. These views are represented by the CardView, CompactCardView, and TableView classes, which derive from the UIViewBase class, as well as the CardflowView3D class, which derives from the MultiSurfaceViewBase class.
The TableView class layouts data items as typical rows, while the CardView and CompactCardView classes layout data items as cards. Either card-view layout can be used to display data items as cards; however, the compact card-view layout applies well when a database has many columns but few of the fields contain data. In this case, the fields that do not contain data will not be displayed in the cards, giving them a more compact appearance. Unlike the above 2-dimensional views previously mentioned, the Cardflow3DView class provides a 3-dimensional card-view layout for the data items in a grid and allows various card "surfaces" to display data using customized, theme-defined surface configurations.
Themes determine the color scheme and default visual cues applied to the elements in a grid and, in the case of multi-surface themes, how and where the regions defined by a surface configuration are displayed. Each system theme provided by Xceed DataGrid for WPF supports each of the previously mentioned 2-dimensional views and are contained in the main Xceed.Wpf.DataGrid.dll assembly (see Themes Overview).
Using Views and Themes
The View property of the DataGridControl class determines which view is applied to a grid. If the View property is left to its default value, null (Nothing in Visual Basic), or explicitly set to null, the default table-view layout will be used with the system color scheme. A view's Theme property can be set to change the color scheme applied to a grid's elements. If a theme is not specified, the system-color theme will be used. In either case, if the system-color theme is not recognized (e.g., a third-party color scheme is being used), the Aero normal-color theme will be used.
![]() |
The Elemental Black theme will be used in the case where the Theme property of a multi-surface view is not set. |
![]() |
When using themes located in a ThemePack and Xceed.Wpf.DataGrid.Views3D assemblies property element syntax must be used. |
Scroll Tip
When a grid is scrolled, a scroll tip can be shown to display information about the first visible row in the viewport. By default, the content of the cell in the first visible row whose parent column is the main column is displayed, using the same template defined by the column's CellContentTemplate property. To display the scroll tip, a view's ShowScrollTip property must be set to true (by default, false).
How a scroll tip's content is displayed can be modified by setting a view's ScrollTipContentTemplate (see Example 3); however, the scroll tip's location (by default, centered with the vertical scroll bar in table view and centered with the horizontal scroll bar in card view) can only be changed by providing an explicit style whose target type is ScrollTip (see Example 3).
![]() |
It is recommended to only display the scroll tip when the ItemScrollingBehavior property is set to Deferred (default) to prevent a loss in performance. |
Glyphs
| Property | Description |
|---|---|
| AscendingSortGlyph | Displayed when a column is sorted in an ascending direction. |
| CurrentItemGlyph | Displayed when an item is current. |
| CollapseGroupGlyph | Displayed to allow a group to be collapsed. |
| DescendingSortGlyph | Displayed when a column is sorted in a descending direction. |
| EditingRowGlyph | Displayed when a row is being edited. |
| ExpandGroupGlyph | Displayed to allow a group to be expanded. |
| InsertionRowGlyph | Displayed by the InsertionRow when a new data item is being created. |
| ValidationErrorGlyph | Displayed when a validation error occurs. |
Examples
All examples in this topic assume that the grid is bound to the Orders table of the Northwind database, unless stated otherwise.
Example 1: Setting a view and theme through attribute syntax
The following examples demonstrates how to use attribute syntax to apply a card-view layout, with the normal-color Aero theme, to a grid.
| XAML | Copy Code |
|---|---|
<Grid xmlns:xcdg="http://schemas.xceed.com/wpf/xaml/datagrid"> | |
Example 2: Setting a view and theme through property element syntax
The following examples demonstrates how to use property element syntax to apply a card-view layout, with the normal-color Aero theme, to a grid.
| XAML | Copy Code |
|---|---|
<Grid xmlns:xcdg="http://schemas.xceed.com/wpf/xaml/datagrid"> | |
Example 3: Displaying a scroll tip
The following example demonstrates how to display a scroll tip whose content and location have been modified.
The "flagConverter" resource represents a converter that is used to return the appropriate BitmapImage according to the value of the ShipCountry cell.
| XAML | Copy Code |
|---|---|
| |
See Also
Basic Concepts
Headers and Footers
Card Views
Table View Overview


Copy Code
Hide All