Xceed DataGrid for WPF v7.3 Documentation
Welcome to Xceed DataGrid, Editors, and 3D Views for WPF v7.3 / Xceed DataGrid for WPF / DataGrid Fundamentals / Views and Themes / Themes / Office 2007 Themes
In This Topic
    Office 2007 Themes
    In This Topic
    Prerequisite Knowledge 
    Views and Themes: Themes Overview

    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


    Figure 1: Card view in Office 2007 Black theme

    Figure 2: Table view in Office 2007 Blue theme

    Figure 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

    Theme Color scheme Attribute syntax Property element syntax Target views Assembly
    Office 2007 Blue [View.]Office2007.Blue
    [View.]Office2007BlueTheme
    Office2007BlueTheme TableflowView and TableView
    CardView and CompactCardView
    Xceed.Wpf.DataGrid.ThemePack.1
    Office 2007 Black [View.]Office2007.Black
    [View.]Office2007BlackTheme
    Office2007BlackTheme TableflowView and TableView
    CardView and CompactCardView
    Xceed.Wpf.DataGrid.ThemePack.1
    Office 2007 Silver [View.]Office2007.Silver
    [View.]Office2007SilverTheme
    Office2007SilverTheme TableflowView and TableView
    CardView and CompactCardView
    Xceed.Wpf.DataGrid.ThemePack.1

    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.

    XAML
    Copy Code
    <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>