ItemContainerStyle Property (DetailConfiguration)
Gets or sets the style that will be applied to the containers (
DataRow ) of the data items in the details to which the configuration is applied.
public Style ItemContainerStyle {get; set;}
'Declaration
Public Property ItemContainerStyle As Style
'Usage
Dim instance As DetailConfiguration
Dim value As Style
instance.ItemContainerStyle = value
value = instance.ItemContainerStyle
Property Value The
Style that will be applied to the containers (
DataRow ) of the data items in the details to which the configuration is applied.
All examples in this topic assume that the grid is bound to the
Employees table of the Northwind database, unless stated otherwise.
The following example demonstrates how to provide an item-container style for the Employee_Orders data relation.
< Grid xmlns:xcdg ="http://schemas.xceed.com/wpf/xaml/datagrid"
xmlns:local ="clr-namespace:Xceed.Wpf.Documentation" >
< Grid.Resources >
< xcdg:DataGridCollectionViewSource x:Key ="cvs_employees"
Source =" {Binding Source={x:Static Application.Current},
Path=Employees} " />
< xcdg:IndexToOddConverter x:Key ="rowIndexConverter" />
< Style x:Key ="alternatingDataRowStyle" TargetType =" {x:Type xcdg:DataRow} " >
< Style.Triggers >
< DataTrigger Binding =" {Binding RelativeSource={RelativeSource Self},
Path=(xcdg:DataGridVirtualizingPanel.ItemIndex),
Converter={StaticResource rowIndexConverter}} "
Value ="True" >
< Setter Property ="Background" Value ="AliceBlue" />
</ DataTrigger >
</ Style.Triggers >
</ Style >
</ Grid.Resources >
< xcdg:DataGridControl x:Name ="EmployeesGrid"
ItemsSource =" {Binding Source={StaticResource cvs_employees}} "
AutoCreateDetailConfigurations ="True" >
< xcdg:DataGridControl.DetailConfigurations >
< xcdg:DetailConfiguration RelationName ="Employee_Orders"
Title ="Employee Orders"
ItemContainerStyle =" {StaticResource alternatingDataRowStyle} " />
</ xcdg:DataGridControl.DetailConfigurations >
</ xcdg:DataGridControl >
</ Grid >
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
2025 © Xceed Software Inc.
4170 Grande-Allée, Suite 100, Greenfield Park, Qc J4V 3N2