Query Task Application

This application shows a simple way to use the ArcGIS Runtime SDK for WPF within a console application. It uses only synchronous methods and no async callbacks. This ensures there's just one thread of execution which is typical of console apps and keeps the flow simple. The Local Server and local Services can be started synchronously, then using synchronous methods on tasks like Query ensure the results are retured to the calling thread.

Download Sample Application
XAML C# VB.NET
<UserControl x:Class="ArcGISWPFSDK.ConsoleHost"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="500">
    <Grid>
        <!--
            See the CodeBehind for the code required for console application
            This XAML is not required for a console application.
        -->
        <Button Content="Start Console Sample" Height="41" HorizontalAlignment="Left" Margin="12,12,0,0" Name="ButtonStartConsole" Click="ButtonStartConsole_Click" VerticalAlignment="Top" Width="238" />
        <TextBox Name ="TextBoxConsole"  Background="Black" Height="195" FontFamily="Lucida Console" Foreground="White" FontSize="12" VerticalScrollBarVisibility="Visible"  HorizontalAlignment="Left" Margin="12,59,0,0" VerticalAlignment="Top" Width="476" IsReadOnly="True"/>
    </Grid>
</UserControl>

Sample code usage restrictions
5/16/2014