<xcdg:DataGridControl x:Name="grid"
ItemsSource="{Binding Source={StaticResource cvsTransactions}}"
ReadOnly="True"
NavigationBehavior="RowOnly">
<xcdg:DataGridControl.Resources>
<!-- These implicit styles that are local to this DataGridControl are an
elegant way to set some desired default values of various grid elements. -->
<ResourceDictionary>
<Style TargetType="xcdg:MergedColumnManagerRow">
<Setter Property="AllowColumnReorder"
Value="{Binding ElementName=allowMergedColumnReorderCheckBox,Path=IsChecked}"/>
<Setter Property="AllowColumnResize"
Value="{Binding ElementName=allowMergedColumnResizeCheckBox,Path=IsChecked}"/>
</Style>
<Style TargetType="xcdg:ColumnManagerRow">
<Setter Property="AllowColumnReorder"
Value="{Binding ElementName=allowColumnReorderCheckBox,Path=IsChecked}"/>
<Setter Property="AllowColumnResize"
Value="{Binding ElementName=allowColumnResizeCheckBox,Path=IsChecked}"/>
</Style>
</ResourceDictionary>
</xcdg:DataGridControl.Resources>
<xcdg:DataGridControl.MergedHeaders>
<xcdg:MergedHeader>
<xcdg:MergedHeader.MergedColumns>
<xcdg:MergedColumn FieldName="Quarter1"
Title="Quarter 1"
CellHorizontalContentAlignment="Center"
ChildColumnNames="JanuarySummary,FebruarySummary,MarchSummary" />
<xcdg:MergedColumn FieldName="Quarter2"
Title="Quarter 2"
CellHorizontalContentAlignment="Center"
ChildColumnNames="AprilSummary,MaySummary,JuneSummary" />
<xcdg:MergedColumn FieldName="Quarter3"
Title="Quarter 3"
CellHorizontalContentAlignment="Center"
ChildColumnNames="JulySummary,AugustSummary,SeptemberSummary" />
<xcdg:MergedColumn FieldName="Quarter4"
Title="Quarter 4"
CellHorizontalContentAlignment="Center"
ChildColumnNames="OctoberSummary,NovemberSummary,DecemberSummary" />
</xcdg:MergedHeader.MergedColumns>
</xcdg:MergedHeader>
<xcdg:MergedHeader>
<xcdg:MergedHeader.MergedColumns>
<xcdg:MergedColumn FieldName="JanuarySummary"
Title="January Transactions"
CellHorizontalContentAlignment="Center"
ChildColumnNames="JanuaryIncome,JanuaryExpense" />
<xcdg:MergedColumn FieldName="FebruarySummary"
Title="February Transactions"
CellHorizontalContentAlignment="Center"
ChildColumnNames="FebruaryIncome,FebruaryExpense" />
<xcdg:MergedColumn FieldName="MarchSummary"
Title="March Transactions"
CellHorizontalContentAlignment="Center"
ChildColumnNames="MarchIncome,MarchExpense" />
<xcdg:MergedColumn FieldName="AprilSummary"
Title="April Transactions"
CellHorizontalContentAlignment="Center"
ChildColumnNames="AprilIncome,AprilExpense" />
<xcdg:MergedColumn FieldName="MaySummary"
Title="May Transactions"
CellHorizontalContentAlignment="Center"
ChildColumnNames="MayIncome,MayExpense" />
<xcdg:MergedColumn FieldName="JuneSummary"
Title="June Transactions"
CellHorizontalContentAlignment="Center"
ChildColumnNames="JuneIncome,JuneExpense" />
<xcdg:MergedColumn FieldName="JulySummary"
Title="July Transactions"
CellHorizontalContentAlignment="Center"
ChildColumnNames="JulyIncome,JulyExpense" />
<xcdg:MergedColumn FieldName="AugustSummary"
Title="August Transactions"
CellHorizontalContentAlignment="Center"
ChildColumnNames="AugustIncome,AugustExpense" />
<xcdg:MergedColumn FieldName="SeptemberSummary"
Title="September Transactions"
CellHorizontalContentAlignment="Center"
ChildColumnNames="SeptemberIncome,SeptemberExpense" />
<xcdg:MergedColumn FieldName="OctoberSummary"
Title="October Transactions"
CellHorizontalContentAlignment="Center"
ChildColumnNames="OctoberIncome,OctoberExpense" />
<xcdg:MergedColumn FieldName="NovemberSummary"
Title="November Transactions"
CellHorizontalContentAlignment="Center"
ChildColumnNames="NovemberIncome,NovemberExpense" />
<xcdg:MergedColumn FieldName="DecemberSummary"
Title="December Transactions"
CellHorizontalContentAlignment="Center"
ChildColumnNames="DecemberIncome,DecemberExpense" />
</xcdg:MergedHeader.MergedColumns>
</xcdg:MergedHeader>
</xcdg:DataGridControl.MergedHeaders>
<xcdg:DataGridControl.Columns>
<xcdg:Column FieldName="JanuaryIncome"
Title="Income"
CellContentTemplate="{StaticResource currencyCellDataTemplate}" />
<xcdg:Column FieldName="JanuaryExpense"
Title="Expense"
CellContentTemplate="{StaticResource currencyCellDataTemplate}" />
<xcdg:Column FieldName="FebruaryIncome"
Title="Income"
CellContentTemplate="{StaticResource currencyCellDataTemplate}" />
<xcdg:Column FieldName="FebruaryExpense"
Title="Expense"
CellContentTemplate="{StaticResource currencyCellDataTemplate}" />
<xcdg:Column FieldName="MarchIncome"
Title="Income"
CellContentTemplate="{StaticResource currencyCellDataTemplate}" />
<xcdg:Column FieldName="MarchExpense"
Title="Expense"
CellContentTemplate="{StaticResource currencyCellDataTemplate}" />
<xcdg:Column FieldName="AprilIncome"
Title="Income"
CellContentTemplate="{StaticResource currencyCellDataTemplate}" />
<xcdg:Column FieldName="AprilExpense"
Title="Expense"
CellContentTemplate="{StaticResource currencyCellDataTemplate}" />
<xcdg:Column FieldName="MayIncome"
Title="Income"
CellContentTemplate="{StaticResource currencyCellDataTemplate}" />
<xcdg:Column FieldName="MayExpense"
Title="Expense"
CellContentTemplate="{StaticResource currencyCellDataTemplate}" />
<xcdg:Column FieldName="JuneIncome"
Title="Income"
CellContentTemplate="{StaticResource currencyCellDataTemplate}" />
<xcdg:Column FieldName="JuneExpense"
Title="Expense"
CellContentTemplate="{StaticResource currencyCellDataTemplate}" />
<xcdg:Column FieldName="JulyIncome"
Title="Income"
CellContentTemplate="{StaticResource currencyCellDataTemplate}" />
<xcdg:Column FieldName="JulyExpense"
Title="Expense"
CellContentTemplate="{StaticResource currencyCellDataTemplate}" />
<xcdg:Column FieldName="AugustIncome"
Title="Income"
CellContentTemplate="{StaticResource currencyCellDataTemplate}" />
<xcdg:Column FieldName="AugustExpense"
Title="Expense"
CellContentTemplate="{StaticResource currencyCellDataTemplate}" />
<xcdg:Column FieldName="SeptemberIncome"
Title="Income"
CellContentTemplate="{StaticResource currencyCellDataTemplate}" />
<xcdg:Column FieldName="SeptemberExpense"
Title="Expense"
CellContentTemplate="{StaticResource currencyCellDataTemplate}" />
<xcdg:Column FieldName="OctoberIncome"
Title="Income"
CellContentTemplate="{StaticResource currencyCellDataTemplate}" />
<xcdg:Column FieldName="OctoberExpense"
Title="Expense"
CellContentTemplate="{StaticResource currencyCellDataTemplate}" />
<xcdg:Column FieldName="NovemberIncome"
Title="Income"
CellContentTemplate="{StaticResource currencyCellDataTemplate}" />
<xcdg:Column FieldName="NovemberExpense"
Title="Expense"
CellContentTemplate="{StaticResource currencyCellDataTemplate}" />
<xcdg:Column FieldName="DecemberIncome"
Title="Income"
CellContentTemplate="{StaticResource currencyCellDataTemplate}" />
<xcdg:Column FieldName="DecemberExpense"
Title="Expense"
CellContentTemplate="{StaticResource currencyCellDataTemplate}" />
</xcdg:DataGridControl.Columns>
<xcdg:DataGridControl.View>
<!-- In this sample, you can define this resource to specify the default
theme this DataGridControl will be in. This is not mandatory, so we
use a DynamicResource to silently ignore its absence. -->
<xcdg:TableflowView Theme="{DynamicResource defaultTheme}"
AllowColumnChooser="{Binding Source={x:Static local:ConfigurationData.Singleton}, Path=AllowColumnChooser}"
ShowFixedColumnSplitter="{Binding Source={x:Static local:ConfigurationData.Singleton}, Path=ShowFixedColumnSplitter}" />
</xcdg:DataGridControl.View>
</xcdg:DataGridControl>