Xceed Toolkit Plus for WPF v4.6 Documentation
Background Brushes
Welcome to Xceed Toolkit Plus for WPF v4.6 > DataGrid, ListBox, Chart, AvalonDock, and PropertyGrid > Datagrid control > Fundamentals > Views and Themes > Background Brushes

The static DataGridControlBackgroundBrushes class exposes a variety of background brushes that can be applied to a grid.

Whereas themes determine the color and look of the elements in a view, backgrounds can be applied to the rest of the datagrid control, in all views.

The brushes displayed below are exposed by the static DataGridControlBackgroundBrushes class and can be used by assigning them to a grid's Background property (see Example 1 in Background Brushes Overview).

Aurora Backgrounds

Evoking the dancing light shows of Earth’s polar zones, the Aurora backgrounds provide a bright display of colors for your application.

Horizon Backgrounds

You can see further with Xceed DataGrid for WPF, and these backgrounds will inspire your end-users to do the same.

Elemental Backgrounds

Designed for the Elemental and Office 2007 themes, these simple yet classy backgrounds subtly add the colors of Office 2007 to your datagrid.

Sunrise Backgrounds

Greet your end-users with the sunrise of a new day (or a sunset if they’re working late) when you decorate your application with the Sunrise backgrounds.

NightFog Background

Add some mysterious nighttime mist to your application with this evocative background.

 

Sun Backgrounds

Bring a ray of sunshine into the end-user experience using these bright and cheery backgrounds.

Examples

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

Example 1: Applying a grid background brush

The following example demonstrates how to apply a one of the custom background brushes (provided by Xceed) to a grid's background.

XAML
Copy Code
<Grid xmlns:xcdg="http://schemas.xceed.com/wpf/xaml/datagrid">

    <Grid.Resources>

       <xcdg:DataGridCollectionViewSource x:Key="cvs_products"

                                       Source="{Binding Source={x:Static Application.Current}, Path=ProductsTable}"/>

      

    </Grid.Resources>

   <xcdg:DataGridControl x:Name="ProductsGrid"

                         ItemsSource="{Binding Source={StaticResource cvs_products}}"

                         Background="{x:Static xcdg:DataGridControlBackgroundBrushes.AuroraRed}">      

       <xcdg:DataGridControl.Columns>

          <xcdg:Column FieldName="ProductName"

                       IsMainColumn="True"/>

       </xcdg:DataGridControl.Columns>

       <xcdg:DataGridControl.View>

          <!-- In Cardflow 3D view, if a theme is not explicitly specified,

               the Elemental Black theme will be used. -->

          <xcdg:CardflowView3D CardHeightToViewportRatio="0.5"/>

       </xcdg:DataGridControl.View>

    </xcdg:DataGridControl>

 </Grid>
VB.NET
Copy Code
dataGridControl.Background = DataGridControlBackgroundBrushes.AuroraRed
C#
Copy Code
dataGridControl.Background = DataGridControlBackgroundBrushes.AuroraRed;