<?xml version="1.0" encoding="utf-8"?>
<UserControl x:Class="GroupAggregates.MainPage" mc:Ignorable="d" d:DesignWidth="640" d:DesignHeight="480" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:c1="http://schemas.componentone.com/winfx/2006/xaml">
    <Grid x:Name="LayoutRoot" Background="White">

        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>

        <StackPanel Background="LightGray">
            <TextBlock Text="C1FlexGrid: Group Aggregates" FontSize="16" FontWeight="Bold" />
            <StackPanel Orientation="Horizontal">
                <TextBlock Text="Select Aggregate: " VerticalAlignment="Center" />
                <ComboBox x:Name="_cmbAggregates" VerticalAlignment="Center" Width="100" SelectionChanged="_cmbAggregates_SelectionChanged" />
            </StackPanel>
        </StackPanel>

        <c1:C1FlexGrid Grid.Row="1" x:Name="_flex" AutoGenerateColumns="False">
            <c1:C1FlexGrid.Columns>
                <c1:Column Header="Line" Binding="{Binding Line, Mode=TwoWay}" />
                <c1:Column Header="Color" Binding="{Binding Color, Mode=TwoWay}" />
                <c1:Column Header="Name" Binding="{Binding Name, Mode=TwoWay}" />
                <c1:Column Header="Price" Binding="{Binding Price, Mode=TwoWay}" Format="n0" HorizontalAlignment="Right" GroupAggregate="Sum" AllowDragging="False" Width="*" />
                <c1:Column Header="Cost" Binding="{Binding Cost, Mode=TwoWay}" Format="n0" HorizontalAlignment="Right" GroupAggregate="Sum" AllowDragging="False" Width="*" />
                <c1:Column Header="Weight" Binding="{Binding Weight, Mode=TwoWay}" Format="n0" HorizontalAlignment="Right" GroupAggregate="Sum" AllowDragging="False" Width="*" />
                <c1:Column Header="Volume" Binding="{Binding Volume, Mode=TwoWay}" Format="n0" HorizontalAlignment="Right" GroupAggregate="Sum" AllowDragging="False" Width="*" />
            </c1:C1FlexGrid.Columns>
        </c1:C1FlexGrid>
    </Grid>
</UserControl>