Event-based Asynchronous Pattern (EAP) with Inline Lambdas Online

This sample demonstrates using the Event-based Asynchronous Pattern (EAP) with inline lambdas for a QueryTask.

Download Sample Application
XAML C# VB.NET
<UserControl x:Class="ArcGISWPFSDK.EventBasedAsyncLambda"
    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:ArcGISTiledMapServiceLayer ID="MyLayer" 
                Url="http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer" />
            <esri:GraphicsLayer ID="MyGraphics"
                                Renderer="{StaticResource FillRenderer}"/>
    </esri:Map>
        <Border HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,10,131,0" Padding="5" Background="White" 
                BorderBrush="Black" BorderThickness="1" Width="231">
            <Border.Effect>
                <DropShadowEffect />
            </Border.Effect>
            <StackPanel Orientation="Horizontal" VerticalAlignment="Top" HorizontalAlignment="Left" 
                    Width="330" Height="50" Margin="5">
                <Button Content="QueryTask using Event Based Async" Margin="5" Width="196" Click="Button_Click_1" />       
            </StackPanel>
        </Border>
    </Grid>
</UserControl>

Sample code usage restrictions
5/16/2014