Skip to main content

GridViewBase.GroupValueContentStyle Property

Gets or sets the style applied to the border around column values displayed within group rows. This is a dependency property.

Namespace: DevExpress.Xpf.Grid

Assembly: DevExpress.Xpf.Grid.v24.2.dll

NuGet Package: DevExpress.Wpf.Grid.Core

Declaration

public Style GroupValueContentStyle { get; set; }

Property Value

Type Description
Style

A Style object that represents the style applied to the border around column values displayed within group rows.

Remarks

The GroupValueContentStyle property specifies the style that groups together properties, resources, and event handlers and shares them between instances of the System.Windows.Controls.Border type.

Target Type: System.Windows.Controls.Border

To learn more, see Appearance Customization.

The GroupValueContentStyle property does not work if the grid is in optimized mode. See the code snippet below for a workaround.

<dxg:TableView UseLightweightTemplates="All">
    <dxg:TableView.GroupValueTemplate>
        <DataTemplate>
            <Border Background="Red" TextBlock.Foreground="YellowGreen" TextBlock.FontWeight="Bold">
                <TextBlock Text="{Binding DisplayText}"/>
            </Border>
        </DataTemplate>
    </dxg:TableView.GroupValueTemplate>
    <!--<dxg:TableView.GroupValueContentStyle>
        <Style TargetType="Border">
            <Setter Property="Background" Value="Red"/>
            <Setter Property="TextBlock.Foreground" Value="YellowGreen"/>
            <Setter Property="TextBlock.FontWeight" Value="Bold"/>
        </Style>
    </dxg:TableView.GroupValueContentStyle>-->
</dxg:TableView>
See Also