<?xml version="1.0" encoding="utf-8"?>
<UserControl x:Class="C1DataGrid_Localization.Page" mc:Ignorable="d" d:DataContext="{d:DesignData Source=/DesignData/SampleProducts.xaml}" d:DesignWidth="458" d:DesignHeight="483" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:c1="http://schemas.componentone.com/winfx/2006/xaml" xmlns:local="clr-namespace:C1DataGrid_Localization" xmlns:common="clr-namespace:C1DataGrid_Demo2010" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006">
    <UserControl.Resources>
        <common:ImageSourceConverter x:Name="ImageSourceConverter" />
        <common:OutlookDateGroupConverter x:Name="OutlookDateGroupConverter" />
        <common:OutlookDateGroupNameConverter x:Name="OutlookDateGroupNameConverter" />
        <common:AlphabeticTextGroupConverter x:Name="AlphabeticTextGroupConverter" />
        <common:NumberRangeGroupConverter x:Name="NumberRangeGroupConverter" />
        <common:NumberRangeGroupNameConverter x:Name="NumberRangeGroupNameConverter" />
        <common:ProductGroupConverter x:Name="ProductGroupConverter" />
        <common:ProductGroupNameConverter x:Name="ProductGroupNameConverter" />
        <local:Models x:Name="Models" />
    </UserControl.Resources>
    <Grid x:Name="LayoutRoot">
        <Grid.RowDefinitions>
            <RowDefinition Height="33" />
            <RowDefinition Height="0.909*" />
        </Grid.RowDefinitions>

        <c1:C1DataGrid x:Name="grid" ItemsSource="{Binding}" AutoGenerateColumns="False" CanUserGroup="True" NewRowVisibility="Top" MaxHeight="500" RowHeight="70" GroupRowHeight="30" Grid.Row="2" Margin="8,8,8,8" VerticalAlignment="Top">
            <c1:C1DataGrid.Columns>
                <!--c1:DataGridImageColumn Binding="{Binding ImageUrl, Converter={StaticResource ImageSourceConverter}, ConverterParameter='C1DataGrid_Localization;component/Resources/'}" Header="Image" SortMemberPath="ImageUrl" FilterMemberPath="ImageUrl"  Width="75" GroupContentConverter="{StaticResource ImageSourceConverter}" /-->
                <c1:DataGridTextColumn Binding="{Binding ProductNumber,Mode=TwoWay}" Header="Product Number" SortMemberPath="ProductNumber" FilterMemberPath="ProductNumber" SortState="Ascending, 1" GroupConverter="{StaticResource ProductGroupConverter}" GroupContentConverter="{StaticResource ProductGroupNameConverter}" />
                <c1:DataGridTextColumn Binding="{Binding Name,Mode=TwoWay}" Header="Name" SortMemberPath="Name" FilterMemberPath="Name" GroupConverter="{StaticResource AlphabeticTextGroupConverter}" />
                <c1:DataGridNumericColumn Binding="{Binding StandardCost,Mode=TwoWay}" Header="Standard Cost" SortMemberPath="StandardCost" FilterMemberPath="StandardCost" GroupConverter="{StaticResource NumberRangeGroupConverter}" GroupContentConverter="{StaticResource NumberRangeGroupNameConverter}" />
                <c1:DataGridComboBoxColumn Binding="{Binding ProductModelID,Mode=TwoWay}" Header="Model" SortMemberPath="ProductModelID" FilterMemberPath="ProductModelID" ItemsSource="{StaticResource Models}" DisplayMemberPath="Name" SelectedValuePath="ProductModelID" SortState="Ascending, 0" />
                <c1:DataGridCheckBoxColumn Binding="{Binding Available,Mode=TwoWay}" Header="Available" SortMemberPath="Available" FilterMemberPath="Available" />
                <c1:DataGridDateTimeColumn Binding="{Binding ExpirationDate,Mode=TwoWay}" Header="Expiration" SortMemberPath="ExpirationDate" FilterMemberPath="ExpirationDate" GroupConverter="{StaticResource OutlookDateGroupConverter}" GroupContentConverter="{StaticResource OutlookDateGroupNameConverter}" />
            </c1:C1DataGrid.Columns>
        </c1:C1DataGrid>
        <StackPanel Orientation="Horizontal" HorizontalAlignment="Stretch" Margin="8,0,8,0">
            <TextBlock Text="Language" TextWrapping="Wrap" TextAlignment="Center" VerticalAlignment="Center" Margin="8,0,0,0" />
            <ComboBox x:Name="cmbColumns" Height="25" Margin="4,0,0,0">
                <ComboBox.ItemTemplate>
                    <DataTemplate>
                        <TextBlock Text="{Binding DisplayName}" />
                    </DataTemplate>
                </ComboBox.ItemTemplate>
            </ComboBox>
        </StackPanel>

    </Grid>
</UserControl>