Skip to main content

Elemental Themes

The Elemental themes, which are represented by the ElementalBlackTheme, ElementalBlueTheme, and ElementalSilverTheme classes, are basic black, blue, and silver themes that were designed to blend perfectly with their corresponding Office 2007 themes.

ElementalBlackElementalBlueElementalSilver
Figure 1: Elemental Black theme with default surface configurationsFigure 2: Elemental Blue theme with default surface configurationsFigure 3: Elemental Silver theme with default surface configurations

The Elemental themes are contained in the "Views 3D" assembly (Xceed.Wpf.DataGrid.Views3D.dll), and like other themes, they can be set using either attribute syntax or property element syntax through a multi-surface view's Theme property (see Example 1).

ThemeColor schemeAttribute syntaxProperty element syntaxTarget viewsAssembly
ElementalBlack[View.]Elemental.Black [View.]ElementalBlackThemeElementalBlackThemeCardflowView3DXceed.Wpf.DataGrid.Views3D
ElementalBlue[View.]Elemental.Blue [View.]ElementalBlueThemeElementalBlueThemeCardflowView3DXceed.Wpf.DataGrid.Views3D
ElementalSilver[View.]Elemental.Silver [View.]ElementalSilverThemeElementalSilverThemeCardflowView3DXceed.Wpf.DataGrid.Views3D

Default Surface Configurations

Like all multi-surface themes, the Elemental themes provide the default SurfaceConfigurations that will be applied to a multi-surface view's surfaces (see Table 1 for a list of the default surface configurations). These default configurations can be overridden by adding surface configurations to a theme's SurfaceConfigurations collection and specifying the surfaces to which they will be applied using the Surfaces attached property defined on the multi-surface view (see Examples 1 and 3 in Surface Configurations). If a surface configuration is added to the SurfaceConfigurations collection but does not specify the surfaces to which it should be applied, it will be ignored. If more than one configuration specifies the same surface, the last one on which the Surfaces attached property was set will be used.

Table 1: Default Elemental surface configurations

Multi-surface viewSurfaceDefault surface configurationIndex
CardflowView3DLeftImageSurfaceConfiguration0
CardflowView3DRightImageSurfaceConfiguration0
CardflowView3DCenterImageAndTitleSurfaceConfiguration1
CardflowView3DBackCompleteSurfaceConfiguration2

Title-region Positions

For some surface configurations, the Elemental themes support more than one title-region position (see Table 2). As such, they expose a TitleRegionPosition attached property that can be set on any of the supported surface configurations to change the position of the title region. The TitleRegionPosition property can also be set directly on the themes to change the title-region position of all the supported surface configurations.

Table 2: Supported title-region positions

Surface configurationPositions
TitleSurfaceConfigurationTop, Middle, and Bottom
ImageAndTitleSurfaceConfigurationTop, Middle, and Bottom

Examples

All examples in this topic assume that the grid is bound to the Employees table of the Northwind database, unless stated otherwise.

Example 1: Using Elemental themes

The following example demonstrates how to set a multi-surface theme using property element syntax.

<Grid xmlns:xcdg="http://schemas.xceed.com/wpf/xaml/datagrid">
<Grid.Resources>
<xcdg:DataGridCollectionViewSource x:Key="cvs_employees"
Source="{Binding Source={x:Static Application.Current}, Path=EmployeesTable}"/>
</Grid.Resources>
<xcdg:DataGridControl x:Name="EmployeesGrid"
ItemsSource="{Binding Source={StaticResource cvs_employees}}">
<xcdg:DataGridControl.View>
<xcdg:CardflowView3D>
<xcdg:CardflowView3D.Theme>
<xcdg:ElementalBlackTheme/>
</xcdg:CardflowView3D.Theme>
</xcdg:CardflowView3D>
</xcdg:DataGridControl.View>
</xcdg:DataGridControl>
</Grid>