Skip to main content

DataViewBase.TotalSummaryElementStyle Property

Gets or sets the style applied to individual text elements in the total summary items within a view. This is a dependency property.

Namespace: DevExpress.Xpf.Grid

Assembly: DevExpress.Xpf.Grid.v22.2.Core.dll

NuGet Package: DevExpress.Wpf.Grid.Core


public Style TotalSummaryElementStyle { get; set; }

Property Value

Type Description

A Style object that is the style applied to individual text elements in the total summary item.


The TotalSummaryElementStyle property is in effect if the DataViewBase.TotalSummaryPosition property is not set to None.

Use the TotalSummaryElementStyle property to define the text element style for all the summaries within a view. To define the text element style for an individual summary item, use the summary item’s SummaryItemBase.TotalSummaryElementStyle property.


The code sample below changes the appearance of total summaries based on their values. This code sample uses the DXBinding mechanism to simplify the trigger definition.


    <dxg:GridSummaryItem FieldName="UnitPrice" SummaryType="Max"/>
    <dxg:GridSummaryItem FieldName="UnitPrice" SummaryType="Min"/>
    <dxg:GridSummaryItem FieldName="Quantity" SummaryType="Max"/>
    <dxg:GridSummaryItem FieldName="Quantity" SummaryType="Min"/>
    <dxg:TableView TotalSummaryPosition="Bottom">
            <Style TargetType="Run">
                <Setter Property="FontWeight" Value="Bold"/>
                    <DataTrigger Binding="{DXBinding '(double)Value le 15'}" Value="True">
                        <Setter Property="Foreground" Value="Red"/>
                    <DataTrigger Binding="{DXBinding '(double)Value gt 15'}" Value="True">
                        <Setter Property="Foreground" Value="Green"/>
See Also