Skip to main content

DataViewBase.FixedTotalSummaryElementStyle Property

Gets or sets the style applied to individual text elements in the fixed total summary item. 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 FixedTotalSummaryElementStyle { get; set; }

Property Value

Type Description

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


The FixedTotalSummaryElementStyle property is in effect if the DataViewBase.ShowFixedTotalSummary property is set to true.

Use the FixedTotalSummaryElementStyle 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.FixedTotalSummaryElementStyle property.


The code sample below demonstrates how to change the appearance of fixed total summary items depending on a summary value. This code sample uses the DXBinding mechanism to simplify the trigger definition.


<dxg:GridControl x:Name="grid" ItemsSource="{Binding Collection}">
        <Style x:Key="SummaryStyle" TargetType="Run">
            <Setter Property="FontWeight" Value="Bold"/>
                <DataTrigger Binding="{DXBinding '(int)Value le 70'}" Value="True">
                    <Setter Property="Foreground" Value="Red"/>
                <DataTrigger Binding="{DXBinding '(int)Value ge 70'}" Value="True">
                    <Setter Property="Foreground" Value="Green"/>
        <dxg:GridColumn FieldName="City"/>
        <dxg:GridColumn FieldName="UnitPrice"/>
        <dxg:GridColumn FieldName="Quantity"/>
        <dxg:GridSummaryItem FieldName="UnitPrice" SummaryType="Count" Alignment="Right"/>
        <dxg:GridSummaryItem FieldName="Quantity" SummaryType="Sum" Alignment="Right"/>
        <dxg:TableView x:Name="view"
                       FixedTotalSummaryElementStyle="{StaticResource SummaryStyle}">
See Also