Xceed Toolkit Plus for WPF v4.6 Documentation
GetIsAlternatingRowStyleEnabled Method
Example 


Xceed.Wpf.DataGrid Assembly > Xceed.Wpf.DataGrid.Views Namespace > TableView Class : GetIsAlternatingRowStyleEnabled Method

The dependency object from which the property value is read.

Gets a value indicating whether an alternate style is applied to every other row.
Syntax
'Declaration
 
Public Shared Function GetIsAlternatingRowStyleEnabled( _
   ByVal obj As DependencyObject _
) As Boolean
'Usage
 
Dim obj As DependencyObject
Dim value As Boolean
 
value = TableView.GetIsAlternatingRowStyleEnabled(obj)
public static bool GetIsAlternatingRowStyleEnabled( 
   DependencyObject obj
)

Parameters

obj

The dependency object from which the property value is read.

Return Value

true if an alternate style is applied to every other row; false otherwise. The default value of this property is usually false; however, for some themes, alternate row styles may be enabled by default.
Example
All examples in this topic assume that the grid is bound to the Orders table of the Northwind database, unless stated otherwise.
The following example demonstrates how to enable alternating row styles.
<Grid xmlns:xcdg="http://schemas.xceed.com/wpf/xaml/datagrid">
  <Grid.Resources>
     <xcdg:DataGridCollectionViewSource x:Key="cvs_orders"
                                        Source="{Binding Source={x:Static Application.Current}, Path=Orders}" />
    <Style TargetType="{x:Type xcdg:TableView}">
       <Setter Property="IsAlternatingRowStyleEnabled"
               Value="True" />
    </Style>
  </Grid.Resources>

  <xcdg:DataGridControl ItemsSource="{Binding Source={StaticResource cvs_orders}}"
                        AutoCreateDetailConfigurations="True">
     <xcdg:DataGridControl.DefaultDetailConfiguration>
       <xcdg:DefaultDetailConfiguration xcdg:TableView.IsAlternatingRowStyleEnabled="False"/>
     </xcdg:DataGridControl.DefaultDetailConfiguration>
  </xcdg:DataGridControl>
</Grid>
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

Reference

TableView Class
TableView Members