TAP operation using Async and Await keywords

This sample demonstrates using the new awaitable TAP operation using async and wait keywords availiable in .NET Framework 4.5 for a QueryTask on local data.

Download Sample Application
XAML C# VB.NET
<UserControl x:Class="ArcGISWPFSDK.LocalAsyncAwait"
    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>
        <Grid.Resources>
            <esri:SimpleFillSymbol x:Key="RedFillSymbol"
                                   Fill="#66FF0000"
                                   BorderBrush="Red"
                                   BorderThickness="2" />
            <esri:SimpleRenderer x:Key="FillRenderer"
                                 Symbol="{StaticResource RedFillSymbol}" />
        </Grid.Resources>
        <esri:Map x:Name="MyMap" UseAcceleratedDisplay="True" WrapAround="True" Background="#FFE3E3E3">
            <esri:ArcGISLocalTiledLayer ID="BaseMap" Path="..\Data\TPKs\Topographic.tpk"/>
            <esri:GraphicsLayer ID="MyGraphics"
                                Renderer="{StaticResource FillRenderer}"/>
        </esri:Map>
        <Border HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,10,143,0" Padding="5" Background="White" 
                BorderBrush="Black" BorderThickness="1" Width="219">
            <Border.Effect>
                <DropShadowEffect />
            </Border.Effect>
            <StackPanel Orientation="Horizontal" VerticalAlignment="Top" HorizontalAlignment="Left" 
                    Width="330" Height="50" Margin="5">
                <Button x:Name="button1" Content="QueryTask using Async Await" Margin="5" Width="188" Click="Button_Click_1" IsEnabled="False"/>
            </StackPanel>
        </Border>
    </Grid>
</UserControl>

Sample code usage restrictions
5/16/2014