Mini Kabibi Habibi
<local:PivotGridDemoModule x:Class="PivotGridDemo.PivotGrid.GroupInterval"
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" Loaded="PivotGridDemoModule_Loaded">
<local:PivotGridDemoModule.Resources>
<ResourceDictionary>
<DataTemplate x:Key="FieldHeaderTemplate">
<dx:SimplePanel>
<Image Source="/PivotGridDemo;component/Images/HeaderIcons/Price.png" Stretch="None" VerticalAlignment="Center"
HorizontalAlignment="Left" Margin="0,-1,2,-1" />
<TextBlock Name="textBlock" Padding="18,0,0,0" Text="{Binding Path=DisplayText, Mode=OneWay}" HorizontalAlignment="Right"
Style="{Binding Path=ActualHeaderContentStyle}" />
</dx:SimplePanel>
</DataTemplate>
</ResourceDictionary>
</local:PivotGridDemoModule.Resources>
<dxdb:DemoModuleControl>
<dxdb:DemoModuleControl.OptionsContent>
<StackPanel Orientation="Vertical">
<dx:GroupFrame Header="Group Settings" Margin="0,0,0,4">
<StackPanel>
<TextBlock VerticalAlignment="Center" Margin="0,4,0,4">Group Interval for the OrderDate field:</TextBlock>
<dxe:ComboBoxEdit Name="cbGroupInterval" VerticalAlignment="Center" HorizontalAlignment="Stretch"
IsTextEditable="False" Margin="0,4,0,4" SelectedIndexChanged="cbGroupInterval_SelectedIndexChanged" />
<dxe:CheckEdit Name="ceProductInterval" IsChecked="{Binding ElementName=fieldProductAlphabetical, Path=Visible, Mode=TwoWay}"
Content="Show Product Alphabetically" Margin="0,4,0,4" />
</StackPanel>
</dx:GroupFrame>
</StackPanel>
</dxdb:DemoModuleControl.OptionsContent>
<dxpg:PivotGridControl x:Name="pivotGrid" local:FieldAreaHelper.FixAreas="True"
RowTreeWidth="248" ShowFilterHeaders="False" FieldValueDisplayText="pivotGrid_FieldValueDisplayText" ShowBorder="False">
<dxpg:PivotGridControl.Fields>
<dxpg:PivotGridField x:Name="fieldProductAlphabetical" FieldName="ProductName" UnboundFieldName="fieldProductAlphabetical"
Area="RowArea" AreaIndex="0"
Caption="Product Alphabetical" GroupInterval="Alphabetical"
Width="155" />
<dxpg:PivotGridField x:Name="fieldProductName" FieldName="ProductName" Area="RowArea" AreaIndex="1"
Width="155" Caption="Product" />
<dxpg:PivotGridField x:Name="fieldExtendedPrice" FieldName="Extended Price" Area="DataArea" AreaIndex="0"
CellFormat="c" HeaderTemplate="{StaticResource ResourceKey=FieldHeaderTemplate}"
HeaderListTemplate="{StaticResource ResourceKey=FieldHeaderTemplate}" />
<dxpg:PivotGridField x:Name="fieldOrderDate" FieldName="OrderDate" UnboundFieldName="fieldOrderDate"
Area="ColumnArea" AreaIndex="0"
GroupInterval="DateMonth" Caption="Order Date" />
</dxpg:PivotGridControl.Fields>
</dxpg:PivotGridControl>
</dxdb:DemoModuleControl>
</local:PivotGridDemoModule>