In This Topic
    In This Topic

    The following example demonstrates how to change the gradient applied to the card surfaces when using the Chameleon theme.

    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.Columns>
              <xcdg:Column FieldName="LastName" IsMainColumn="True"/>
              <xcdg:Column FieldName="Notes" Visible="False"/>
              <xcdg:Column FieldName="ReportsTo" Visible="False"/>
              <xcdg:Column FieldName="StillEmployed" Visible="False"/>
              <xcdg:Column FieldName="TitleOfCourtesy" Visible="False"/>
           </xcdg:DataGridControl.Columns>
           <xcdg:DataGridControl.View>
              <xcdg:CardflowView3D>
                <xcdg:CardflowView3D.Theme>
                   <xcdg:ChameleonTheme GradientLightColor="Pink"
                                        GradientDarkColor="Purple">
                    
                   </xcdg:ChameleonTheme>                
                </xcdg:CardflowView3D.Theme>
              </xcdg:CardflowView3D>
           </xcdg:DataGridControl.View>
        </xcdg:DataGridControl>
     </Grid>
    VB.NET
    Copy Code
    dataGridControl.Columns( "LastName" ).IsMainColumn = True
    dataGridControl.Columns( "Notes" ).Visible= False
    dataGridControl.Columns( "ReportsTo" ).Visible = False
    dataGridControl.Columns( "StillEmployed" ).Visible = False
    dataGridControl.Columns( "TitleOfCourtesy" ).Visible = False
    Dim theme As New ChameleonTheme()
    theme.GradientLightColor = Brushes.Pink.Color
    theme.GradientDarkColor = Brushes.Purple.Color
    Dim view As New CardflowView3D()
    view.Theme = theme
    dataGridControl.View = view
    C#
    Copy Code
    dataGridControl.Columns[ "LastName" ].IsMainColumn = true;
    dataGridControl.Columns[ "Notes" ].Visible= false;
    dataGridControl.Columns[ "ReportsTo" ].Visible = false;
    dataGridControl.Columns[ "StillEmployed" ].Visible = false;
    dataGridControl.Columns[ "TitleOfCourtesy" ].Visible = false;
    ChameleonTheme theme = new ChameleonTheme();
    theme.GradientLightColor = Brushes.Pink.Color;
    theme.GradientDarkColor = Brushes.Purple.Color;
    CardflowView3D view = new CardflowView3D();
    view.Theme = theme;
    dataGridControl.View = view;