Back to Devexpress

GridViewBase.GroupValueContentStyle Property

wpf-devexpress-dot-xpf-dot-grid-dot-gridviewbase-610c509f.md

latest2.6 KB
Original Source

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.v25.2.dll

NuGet Package : DevExpress.Wpf.Grid.Core

Declaration

csharp
public Style GroupValueContentStyle { get; set; }
vb
Public Property GroupValueContentStyle As Style

Property Value

TypeDescription
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.

xaml
<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

GridViewBase Class

GridViewBase Members

DevExpress.Xpf.Grid Namespace