In This Topic
    In This Topic

    The following example demonstrates how to provide an empty-surface brush, which will be applied to all cards that do not display a surface.

    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}"/>
     
         <LinearGradientBrush x:Key="emptySurfaceBrush"
                              StartPoint="0.5,1"
                              EndPoint="0.5,0">
            <GradientStop Offset="0" Color="#FF0E0E0E"/>
            <GradientStop Offset="0.33" Color="#FF323232"/>
            <GradientStop Offset="0.63" Color="#FF4C4C4C"/>
            <GradientStop Offset="1" Color="#FF949494"/>
         </LinearGradientBrush>
      </Grid.Resources>
     
      <xcdg:DataGridControl x:Name="EmployeesGrid"
                          ItemsSource="{Binding Source={StaticResource cvs_employees}}">
       <xcdg:DataGridControl.Columns>
          <xcdg:Column FieldName="LastName"
                       IsMainColumn="True"/>
       </xcdg:DataGridControl.Columns>
       <xcdg:DataGridControl.View>      
         <xcdg:CardflowView3D SideCardsCount="1"
                              EmptySurfaceBrush="{StaticResource emptySurfaceBrush}">
             <xcdg:CardflowView3D.Theme>
                <xcdg:ElementalBlackTheme/>
             </xcdg:CardflowView3D.Theme>
          </xcdg:CardflowView3D>
       </xcdg:DataGridControl.View>
      </xcdg:DataGridControl>
    </Grid>
    VB.NET
    Copy Code
    Dim brush As New LinearGradientBrush()
    brush.GradientStops.Add( New GradientStop( Color.FromArgb( 255, 14, 14, 14 ), 0 ) )
    brush.GradientStops.Add( New GradientStop( Color.FromArgb( 255, 50, 50, 50 ), 0.33 ) )
    brush.GradientStops.Add( New GradientStop( Color.FromArgb( 255, 76, 76, 76 ), 0.63 ) )
    brush.GradientStops.Add( New GradientStop( Color.FromArgb( 255, 148, 148, 148 ), 1 ) )
    dataGridControl.Columns( "LastName" ).IsMainColumn = True
    Dim view As New CardflowView3D()
    view.SideCardsCount = 1
    view.EmptySurfaceBrush = brush
    view.Theme = New ElementalBlackTheme()
    dataGridControl.View = view
    C#
    Copy Code
    LinearGradientBrush brush = new LinearGradientBrush();
    brush.GradientStops.Add( new GradientStop( Color.FromArgb( 255, 14, 14, 14 ), 0 ) );
    brush.GradientStops.Add( new GradientStop( Color.FromArgb( 255, 50, 50, 50 ), 0.33 ) );
    brush.GradientStops.Add( new GradientStop( Color.FromArgb( 255, 76, 76, 76 ), 0.63 ) );
    brush.GradientStops.Add( new GradientStop( Color.FromArgb( 255, 148, 148, 148 ), 1 ) );
    dataGridControl.Columns[ "LastName" ].IsMainColumn = true;
    CardflowView3D view = new CardflowView3D();
    view.SideCardsCount = 1;
    view.EmptySurfaceBrush = brush;
    view.Theme = new ElementalBlackTheme();
    dataGridControl.View = view;