This repository has been archived by the owner on Oct 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
MainWindow.xaml
44 lines (41 loc) · 3.32 KB
/
MainWindow.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<Window x:Class="DevExpress.Example03.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
xmlns:dxgt="http://schemas.devexpress.com/winfx/2008/xaml/grid/themekeys"
xmlns:self="clr-namespace:DevExpress.Example03"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
Title="MainWindow" Height="350" Width="525">
<Window.Resources>
<dx:BoolToThicknessConverter x:Key="GroupColumnSummaryBoolToThicknessConverter" ThicknessFalse="0" ThicknessTrue="0,0,1,0" />
<dx:BoolToVisibilityConverter x:Key="BoolToVisibilityConverter"/>
</Window.Resources>
<Grid>
<dxg:GridControl AutoGenerateColumns="AddNew" ItemsSource="{Binding Employees}" x:Name="dxGrid" EnableSmartColumnsGeneration="True">
<dxg:GridControl.View>
<dxg:TableView Name="view" AllowPerPixelScrolling="True" GroupSummaryDisplayMode="AlignByColumns" UseLightweightTemplates="Row">
<dxg:TableView.GroupColumnSummaryContentStyle>
<Style TargetType="{x:Type dxg:GroupColumnSummaryControl}">
<Setter Property="Padding" Value="{DynamicResource {dxgt:GroupRowThemeKey ResourceKey=GroupColumnSummaryPadding}}" />
<Setter Property="NormalBorderBrush" Value="{DynamicResource {dxgt:GridRowThemeKey ResourceKey=GridDataRowDelimiterBrush}}" />
<Setter Property="FocusedBorderBrush" Value="{DynamicResource {dxgt:GroupRowThemeKey ResourceKey=GroupColumnSummaryFocusedBorderBrush}}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type dxg:GroupColumnSummaryControl}">
<Border Padding="{TemplateBinding Padding}" BorderThickness="{Binding HasRightSibling, Converter={StaticResource GroupColumnSummaryBoolToThicknessConverter}}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" Width="{Binding Column.ActualHeaderWidth}">
<StackPanel>
<ContentPresenter x:Name="PART_Content" Content="{Binding}" ContentTemplate="{Binding View.GroupColumnSummaryItemTemplate}" Visibility="{Binding HasSummary, Converter={StaticResource BoolToVisibilityConverter}}" />
<self:EditorWrapper Column="{Binding Column}" RowHandle="{Binding DataContext.RowHandle.Value, RelativeSource={RelativeSource AncestorType=dxg:GroupGridRow}}"/>
</StackPanel>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</dxg:TableView.GroupColumnSummaryContentStyle>
</dxg:TableView>
</dxg:GridControl.View>
</dxg:GridControl>
</Grid>
</Window>