[Root] / Xceed.Wpf.DataGrid Assembly / Xceed.Wpf.DataGrid.Views Namespace / CardBackgroundBrushes Class
Example


In This Topic
    CardBackgroundBrushes Class
    In This Topic
    Static class that provides a variety of brushes that were designed to be used as card backgrounds.
    Syntax
    'Declaration
     
    Public MustInherit NotInheritable Class CardBackgroundBrushes 
    'Usage
     
    Dim instance As CardBackgroundBrushes
    public static class 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

    Public Properties
     NameDescription
    Public Propertystatic (Shared in Visual Basic)The Pebble texture can be added to cards and is applied to their backgrounds, giving them a unique look and feel.  
    Public Propertystatic (Shared in Visual Basic)The Retro texture can be added to cards and is applied to their backgrounds, giving them a unique look and feel.  
    Public Propertystatic (Shared in Visual Basic)The Sunrise texture can be added to cards and is applied to their backgrounds, giving them a unique look and feel.  
    Top
    Supported Frameworks

    .NET: net5.0, net5.0-windows, net6.0, net6.0-macos, net6.0-windows, net7.0, net7.0-macos, net7.0-windows, net8.0, net8.0-browser, net8.0-macos, net8.0-windows, net9.0, net9.0-browser, net9.0-macos, net9.0-windows, net10.0, net10.0-browser, net10.0-macos, net10.0-windows.

    .NET Framework: net20, net35, net40, net403, net45, net451, net452, net46, net461, net462, net463, net47, net471, net472, net48, net481.

    See Also