Back to Devexpress

TableView.GroupBandSummaryContentStyle Property

wpf-devexpress-dot-xpf-dot-grid-dot-tableview-bc807916.md

latest3.0 KB
Original Source

TableView.GroupBandSummaryContentStyle Property

Gets or sets the style applied to group summary items aligned by bands. 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 GroupBandSummaryContentStyle { get; set; }
vb
Public Property GroupBandSummaryContentStyle As Style

Property Value

TypeDescription
Style

A Style object that is the style applied to group summary items aligned by bands.

|

Remarks

The position of group summaries within a group row is specified by the TableView.GroupSummaryDisplayMode property. If this property is set to AlignByColumns, and columns are arranged within a band, group summaries are aligned by bands.

The following code sample demonstrates how to use the GroupBandSummaryContentStyle property:

xaml
<dxg:GridControl.GroupSummary>
    <dxg:GridSummaryItem FieldName="UnitPrice" SummaryType="Average"/>
    <dxg:GridSummaryItem FieldName="Quantity" SummaryType="Sum"/>
</dxg:GridControl.GroupSummary>
<dxg:GridControl.View>
    <dxg:TableView GroupSummaryDisplayMode="AlignByColumns" 
                   ShowGroupedColumns="True">
        <dxg:TableView.GroupBandSummaryContentStyle>
            <Style TargetType="dxg:GroupBandSummaryControl">
                <Setter Property="NormalBackground" Value="Bisque"/>
                <Setter Property="FocusedBackground" Value="LightBlue"/>

                <Setter Property="NormalForeground" Value="Gray"/>
                <Setter Property="FocusedForeground" Value="Black"/>

                <Setter Property="NormalBorderBrush" Value="LightGray"/>
                <Setter Property="FocusedBorderBrush" Value="LightSkyBlue"/>

                <Style.Triggers>
                    <DataTrigger Binding="{Binding HasSummary}" Value="False">
                        <Setter Property="Visibility" Value="Hidden"/>
                    </DataTrigger>
                </Style.Triggers>
            </Style>
        </dxg:TableView.GroupBandSummaryContentStyle>
    </dxg:TableView>
</dxg:GridControl.View>

See Also

Appearance Customization

TableView Class

TableView Members

DevExpress.Xpf.Grid Namespace