Skip to main content

Office 2007 Themes

The Office 2007 themes, which are represented by the Office2007BlackTheme, Office2007BlueTheme, and Office2007SilverTheme classes, are pixel-perfect themes that can be seamlessly integrated into any Office 2007-like application.

The Office 2007 themes are contained in the Xceed.Wpf.DataGrid.Themes.Office2007 assembly, which must be added to the project references (see Table 1).

Table 1: Office 2007 theme syntaxes

Themecolor paletteAttribute syntaxProperty element syntaxTarget viewsAssembly
Office 2007Blue[View.]Office2007.Blue [View.]Office2007BlueThemeOffice2007BlueThemeTableflowView and TableViewXceed.Wpf.DataGrid.Themes.Office2007
Office 2007Black[View.]Office2007.Black [View.]Office2007BlackThemeOffice2007BlackThemeTableflowView and TableView CardView and CompactCardViewXceed.Wpf.DataGrid.Themes.Office2007
Office 2007Silver[View.]Office2007.Silver [View.]Office2007SilverThemeOffice2007SilverThemeTableflowView and TableView CardView and CompactCardViewXceed.Wpf.DataGrid.Themes.Office2007

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 Office 2007 themes

The following example demonstrates how to set an Office 2007 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:CardView>
<xcdg:CardView.Theme>
<xcdg:Office2007BlackTheme/>
</xcdg:CardView.Theme>
</xcdg:CardView>
</xcdg:DataGridControl.View>
</xcdg:DataGridControl>
</Grid>