Static class that provides a variety of brushes that were designed to be used as card backgrounds.
Syntax
public static class CardBackgroundBrushes
'Declaration
Public MustInherit NotInheritable Class CardBackgroundBrushes
'Usage
Dim instance As CardBackgroundBrushes
Example
All examples in this topic assume that the grid is bound to the
Products table of the Northwind database, unless stated otherwise.
The following example demonstrates how to apply one of the custom background brushes (provided by Xceed) cards (i.e., data rows) by creating an implicit style that targets DataRow and that sets the background property.
<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}"/>
<Style TargetType="{x:Type xcdg:DataRow}">
<Setter Property="Background"
Value="{x:Static xcdg:CardBackgroundBrushes.Retro}"/>
</Style>
</Grid.Resources>
<xcdg:DataGridControl x:Name="ProductsGrid"
ItemsSource="{Binding Source={StaticResource cvs_products}}">
<xcdg:DataGridControl.Columns>
<xcdg:Column FieldName="ProductName"
IsMainColumn="True"/>
</xcdg:DataGridControl.Columns>
<xcdg:DataGridControl.View>
<xcdg:CardflowView3D CardHeightToViewportRatio="0.5">
<xcdg:CardflowView3D.Theme>
<xcdg:ElementalBlackTheme/>
</xcdg:CardflowView3D.Theme>
</xcdg:CardflowView3D>
</xcdg:DataGridControl.View>
</xcdg:DataGridControl>
</Grid>
Inheritance Hierarchy
System.Object
Xceed.Wpf.DataGrid.Views.CardBackgroundBrushes
Requirements
Target Platforms: Windows 11, Windows 10, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
See Also