Statistics With Map

The sample demonstrates the ability to render statistics results on the Map using local data. The result of Statistics query is added to a graphicslayer then a Query is performed on states sub-layer to get all states in each sub-region. The states in each sub-region are unioned and appended to graphics layer from statistics Query result.

Download Sample Application
XAML C# VB.NET
<UserControl x:Class="ArcGISWPFSDK.LocalStatisticsWithMap"
 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:esri="http://schemas.esri.com/arcgis/client/2009">
    <Grid x:Name="LayoutRoot" Background="White">
        <Grid.Resources>
            <BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
        </Grid.Resources>
        <Grid.ColumnDefinitions>
            <ColumnDefinition />
            <ColumnDefinition />
        </Grid.ColumnDefinitions>
        <esri:Map x:Name="MyMap" WrapAround="True" UseAcceleratedDisplay="True" MinimumResolution="2500" Extent="-15000000,2000000,-7000000,8000000"  >
            <esri:ArcGISLocalTiledLayer ID="BaseMap" Path="..\Data\TPKs\Topographic.tpk"/>
            <esri:GraphicsLayer ID="SumGraphicsLayer">
                <esri:GraphicsLayer.MapTip>
                    <Border esri:GraphicsLayer.MapTipHideDelay="00:00:01.5"
                            BorderBrush="Black" BorderThickness="1" Background="WhiteSmoke">
                        <StackPanel Orientation="Vertical" Margin="5">
                            <StackPanel Orientation="Horizontal">
                                <TextBlock Text="Sub-Region: " FontWeight="Bold" />
                                <TextBlock Text="{Binding [SUB_REGION]}" />
                            </StackPanel>
                            <StackPanel Orientation="Horizontal">
                                <TextBlock Text="Population: " FontWeight="Bold" />
                                <TextBlock Text="{Binding [SubRegionPopulation]}" />
                            </StackPanel>
                        </StackPanel>
                    </Border>
                </esri:GraphicsLayer.MapTip>
            </esri:GraphicsLayer>
        </esri:Map>

        <esri:FeatureDataGrid Grid.Column="1" Margin="5"
                Map="{Binding ElementName=MyMap}"
				GraphicsLayer="{Binding ElementName=MyMap, Path=Layers.[SumGraphicsLayer]}" />
        <ProgressBar x:Name="MyProgressBar" IsIndeterminate="True" VerticalAlignment="Bottom" Width="200" Height="20" Margin="10" Visibility="{Binding Path=IsBusy, Converter={StaticResource BooleanToVisibilityConverter}}"></ProgressBar>
    </Grid>
</UserControl>
Sample code usage restrictions
5/16/2014