<?xml version="1.0" encoding="utf-8"?>
<UserControl x:Class="EsriMapSamples.FeatureDataGrid" mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="564" 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:basics="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls" xmlns:esri="http://schemas.esri.com/arcgis/client/2009" xmlns:c1="http://schemas.componentone.com/winfx/2006/xaml">
    
    <Grid x:Name="LayoutRoot" Background="White">
        <Grid.Resources>
            <esri:SimpleRenderer x:Key="SelectRenderer">
                <esri:SimpleRenderer.Symbol>
                    <esri:SimpleFillSymbol>
                        <esri:SimpleFillSymbol.ControlTemplate>
                            <ControlTemplate>
                                <Path x:Name="Element" Fill="#330000FF" Stroke="Black" StrokeThickness="1" Cursor="Hand">
                                    <VisualStateManager.VisualStateGroups>
                                        <VisualStateGroup x:Name="SelectionStates">
                                            <VisualState x:Name="Unselected" />
                                            <VisualState x:Name="Selected">
                                                <Storyboard>
                                                    <ColorAnimation Storyboard.TargetName="Element" Storyboard.TargetProperty="(Path.Fill).(SolidColorBrush.Color)" To="#99FFFF00" Duration="0:0:.25" />
                                                    <ColorAnimation Storyboard.TargetName="Element" Storyboard.TargetProperty="(Path.Stroke).(SolidColorBrush.Color)" To="#9900FFFF" Duration="0:0:.25" />
                                                    <DoubleAnimation Storyboard.TargetName="Element" Storyboard.TargetProperty="StrokeThickness" To="3" Duration="00:00:.25" />
                                                </Storyboard>
                                            </VisualState>
                                        </VisualStateGroup>
                                    </VisualStateManager.VisualStateGroups>
                                </Path>
                            </ControlTemplate>
                        </esri:SimpleFillSymbol.ControlTemplate>
                    </esri:SimpleFillSymbol>
                </esri:SimpleRenderer.Symbol>
            </esri:SimpleRenderer>
        </Grid.Resources>
        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
            <RowDefinition Height="5" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <esri:Map x:Name="MyMap" WrapAround="True" Background="White" Extent="-14930991.170,3611744.037,-11348896.882,5340571.181">
            <esri:ArcGISTiledMapServiceLayer ID="Street Map" Url="http://services.arcgisonline.com/ArcGIS/rest/services/World_Shaded_Relief/MapServer" />
            <esri:FeatureLayer ID="California" Renderer="{StaticResource SelectRenderer}" MouseLeftButtonDown="FeatureLayer_MouseLeftButtonDown" Url="http://serverapps.esri.com/ArcGIS/rest/services/California/MapServer/8" OutFields="*" />
        </esri:Map>

        <basics:GridSplitter Grid.Row="1" HorizontalAlignment="Stretch" />

        <c1:C1FlexGrid Grid.Row="2" x:Name="c1FlexGrid1" AutoGenerateColumns="False" Foreground="Black">
            <!--<c1:C1FlexGridFilterService.FlexGridFilter>
                <c1:C1FlexGridFilter/>
            </c1:C1FlexGridFilterService.FlexGridFilter>-->
            <c1:C1FlexGrid.Columns>
                <c1:Column Binding="{Binding NAME}" />
                <c1:Column Binding="{Binding AREA}" />
                <c1:Column Binding="{Binding POP2000}" />
                <c1:Column Binding="{Binding POP2001}" />
                <c1:Column Binding="{Binding POP00_SQMI}" />
                <c1:Column Binding="{Binding WHITE}" />
                <c1:Column Binding="{Binding BLACK}" />
                <c1:Column Binding="{Binding AMERI_ES}" />
                <c1:Column Binding="{Binding ASIAN}" />
                <c1:Column Binding="{Binding HAWN_PI}" />
                <c1:Column Binding="{Binding OTHER}" />
                <c1:Column Binding="{Binding MULT_RACE}" />
                <c1:Column Binding="{Binding HISPANIC}" />
                <c1:Column Binding="{Binding MALES}" />
                <c1:Column Binding="{Binding FEMALES}" />
                <c1:Column Binding="{Binding AGE_5_17}" />
                <c1:Column Binding="{Binding AGE_18_21}" />
                <c1:Column Binding="{Binding AGE_22_29}" />
                <c1:Column Binding="{Binding AGE_30_39}" />
                <c1:Column Binding="{Binding AGE_40_49}" />
                <c1:Column Binding="{Binding AGE_50_64}" />
                <c1:Column Binding="{Binding AGE_65_UP}" />
                <c1:Column Binding="{Binding MED_AGE}" />
                <c1:Column Binding="{Binding MED_AGE_M}" />
                <c1:Column Binding="{Binding MED_AGE_F}" />
            </c1:C1FlexGrid.Columns>
        </c1:C1FlexGrid>
       
    </Grid>
</UserControl>