Back to Devexpress

SummaryItemBase.Alignment Property

wpf-devexpress-dot-xpf-dot-grid-dot-summaryitembase-3df54534.md

latest6.0 KB
Original Source

SummaryItemBase.Alignment Property

Gets or sets the horizontal alignment within the Fixed Summary Panel. This is a dependency property.

Namespace : DevExpress.Xpf.Grid

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

NuGet Package : DevExpress.Wpf.Grid.Core

Declaration

csharp
public GridSummaryItemAlignment Alignment { get; set; }
vb
Public Property Alignment As GridSummaryItemAlignment

Property Value

TypeDescription
GridSummaryItemAlignment

A GridSummaryItemAlignment enumeration value that specifies the summary item’s horizontal alignment within the Fixed Summary Panel.

|

Available values:

NameDescription
Default

A summary is displayed within the Summary Panel.

| | Left |

A summary is displayed within the Fixed Summary Panel and aligned to the left.

| | Right |

A summary is displayed within the Fixed Summary Panel and aligned to the right.

|

Remarks

Total summaries can be displayed within the Summary Panel and Fixed Summary Panel. Summaries displayed within the Fixed Summary Panel are not horizontally scrolled. They are always visible onscreen, regardless of the corresponding column’s position and visibility.

If the Alignment property is set to GridSummaryItemAlignment.Default, the total summary is displayed within the Summary Panel. To display the total summary within the Fixed Summary Panel, align it to the Left or Right using the Alignment property.

The following code snippets (auto-collected from DevExpress Examples) contain references to the Alignment property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

how-to-bind-wpf-grid-to-data/CS/CodeBehind/EFCore/LocalData/MainWindow.xaml#L17

xml
<dxg:GridControl.TotalSummary>
    <dxg:GridSummaryItem SummaryType="Count" Alignment="Right" />
</dxg:GridControl.TotalSummary>

wpf-data-grid-implement-crud-operations/CS/CodeBehind/EFCore/LocalData/MainWindow.xaml#L38

xml
<dxg:GridControl.TotalSummary>
    <dxg:GridSummaryItem SummaryType="Count" Alignment="Right" />
</dxg:GridControl.TotalSummary>

wpf-data-grid-bind-to-pagedasyncsource/CS/PagedAsyncSourceSample/MainWindow.xaml#L30

xml
<dxg:GridControl.TotalSummary>
    <dxg:GridSummaryItem SummaryType="Count" Alignment="Right"/>
    <dxg:GridSummaryItem SummaryType="Max" FieldName="Created" DisplayFormat="{}Last created: {0}" Alignment="Right"/>

wpf-data-grid-bind-to-infiniteasyncsource/CS/InfiniteAsyncSourceSample/MainWindow.xaml#L34

xml
<dxg:GridControl.TotalSummary>
    <dxg:GridSummaryItem SummaryType="Count" Alignment="Right"/>
    <dxg:GridSummaryItem SummaryType="Max" FieldName="Created" DisplayFormat="{}Last created: {0}" Alignment="Right"/>

wpf-data-grid-extend-crud-operations/CS/DetailCollectionEditing/MainWindow.xaml#L33

xml
<dxg:GridControl.TotalSummary>
    <dxg:GridSummaryItem SummaryType="Count" Alignment="Right" />
</dxg:GridControl.TotalSummary>

See Also

Total Summary

TotalSummaryPosition

ShowFixedTotalSummary

SummaryItemBase Class

SummaryItemBase Members

DevExpress.Xpf.Grid Namespace