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 themes were designed to blend prefectly with the corresponding Elemental themes.

Office2007Black_CardViewOffice2007Blue_TableViewOffice2007Silver_CompactCardView
Figure 1: Card view in Office 2007 Black themeFigure 2: Table view in Office 2007 Blue themeFigure 3: Compact-card view in Office 2007 Silver theme

The Office 2007 themes are contained in a "Theme Pack" that contains various non-system themes. In order to use the Office 2007 themes, which are located in Theme Pack 1, the containing assembly must be added to the project references (see Table 1). 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).

Table 1: Office 2007 theme syntaxes

ThemeColor schemeAttribute syntaxProperty element syntaxTarget viewsAssembly
Office2007Blue[View.]Office2007.Blue [View.]Office2007BlueThemeOffice2007BlueThemeTableflowView and TableView CardView and CompactCardView
Office2007Black[View.]Office2007.Black [View.]Office2007BlackThemeOffice2007BlackThemeTableflowView and TableView CardView and CompactCardView
Office2007Silver[View.]Office2007.Silver [View.]Office2007SilverThemeOffice2007SilverThemeTableflowView and TableView CardView and CompactCardView

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>