Mini Kabibi Habibi
<local:PivotGridDemoModule x:Class="PivotGridDemo.PivotGrid.Groups"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:collections="clr-namespace:System.Collections;assembly=mscorlib"
xmlns:local="clr-namespace:PivotGridDemo.PivotGrid"
xmlns:dxpg="http://schemas.devexpress.com/winfx/2008/xaml/pivotgrid"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:dxdb="http://schemas.devexpress.com/winfx/2008/xaml/demobase"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core">
<dxdb:DemoModuleControl SupressGroupFramePaddingInOptions="False">
<dxdb:DemoModuleControl.OptionsContent>
<StackPanel Orientation="Vertical">
<Button Content="Collapse All Groups" Click="Expand_Click" Name="ButtonCollapse" Padding="4,2,4,2" />
<Button Content="Expand All Groups" Click="Collapse_Click" Name="ButtonExpand" Padding="4,2,4,2" Margin="0,10,0,0" />
</StackPanel>
</dxdb:DemoModuleControl.OptionsContent>
<dxpg:PivotGridControl x:Name="pivotGrid" local:FieldAreaHelper.FixAreas="True"
RowTreeWidth="200" ShowBorder="False">
<dxpg:PivotGridControl.Fields>
<dxpg:PivotGridField x:Name="fieldCategory" FieldName="CategoryName" Area="RowArea" Width="100"
Caption="Category" Group="{Binding ElementName=PivotGridGroup1}" />
<dxpg:PivotGridField x:Name="fieldProduct" FieldName="ProductName" Area="RowArea" Width="200" Caption="Product"
Group="{Binding ElementName=PivotGridGroup1}" />
<dxpg:PivotGridField x:Name="fieldYear" FieldName="OrderDate" Area="ColumnArea" GroupInterval="DateYear" Caption="Year"
Width="80" Group="{Binding ElementName=PivotGridGroup2}" />
<dxpg:PivotGridField x:Name="fieldQuarter" FieldName="OrderDate" Area="ColumnArea" GroupInterval="DateQuarter" Caption="Quarter"
ExpandedInFieldsGroup="False" Width="80" ValueFormat="Quarter {0}" Group="{Binding ElementName=PivotGridGroup2}" />
<dxpg:PivotGridField x:Name="fieldMonth" FieldName="OrderDate" Area="ColumnArea" GroupInterval="DateMonth" Caption="Month"
Width="80" Group="{Binding ElementName=PivotGridGroup2}" />
<dxpg:PivotGridField x:Name="fieldExtendedPrice" FieldName="Extended Price" Area="DataArea" Width="100"
Caption="Order Amount"
ExpandedInFieldsGroup="False" Group="{Binding ElementName=PivotGridGroup3}" />
<dxpg:PivotGridField x:Name="fieldQuantity" FieldName="Quantity" Area="DataArea" Width="100"
Caption="Quantity"
Group="{Binding ElementName=PivotGridGroup3}" />
<dxpg:PivotGridField x:Name="fieldDiscount" FieldName="Discount" Area="DataArea" Width="100"
Caption="Discount (Avr)" SummaryType="Average"
CellFormat="p" Group="{Binding ElementName=PivotGridGroup3}" />
</dxpg:PivotGridControl.Fields>
<dxpg:PivotGridControl.Groups>
<dxpg:PivotGridGroup x:Name="PivotGridGroup1" />
<dxpg:PivotGridGroup x:Name="PivotGridGroup2" />
<dxpg:PivotGridGroup x:Name="PivotGridGroup3" />
</dxpg:PivotGridControl.Groups>
</dxpg:PivotGridControl>
</dxdb:DemoModuleControl>
</local:PivotGridDemoModule>