Offset Online

This sample demonstrates using an ESRI.ArcGIS.Client.Tasks GeometryService that takes an input graphic polygon and returns a buffered (or offset) graphic polygon. To obtain the input graphic polygon, a user makes a single mouse click that generates a graphic which is turned into an MapPoint object. The MapPoint object has a SpatialReference applied and is used as an input into the FindGraphicsInHostCoordinates Method which generates the input graphic polygon.

To use the sample, click on a parcel to generate an offset (cyan).

Download Sample Application
XAML C# VB.NET
<UserControl x:Class="ArcGISWPFSDK.Offset"
    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">

        <Grid.Resources>
            <esri:SimpleLineSymbol x:Key="RedLineSymbol" Color="Red" Width="4" Style="Solid" />
            <esri:SimpleFillSymbol x:Key="BlueFillSymbol" Fill="#990000FF" BorderBrush="Blue" />
            <esri:SimpleFillSymbol x:Key="CyanFillSymbol" Fill="#4400FFFF"  BorderBrush="Cyan"/>
            <LinearGradientBrush x:Key="PanelGradient" EndPoint="0.5,1" StartPoint="0.5,0">
                <LinearGradientBrush.RelativeTransform>
                    <TransformGroup>
                        <ScaleTransform CenterY="0.5" CenterX="0.5"/>
                        <SkewTransform CenterY="0.5" CenterX="0.5"/>
                        <RotateTransform Angle="176" CenterY="0.5" CenterX="0.5"/>
                        <TranslateTransform/>
                    </TransformGroup>
                </LinearGradientBrush.RelativeTransform>
                <GradientStop Color="#FF145787" Offset="0.16"/>
                <GradientStop Color="#FF3D7FAC" Offset="0.502"/>
                <GradientStop Color="#FF88C5EF" Offset="0.984"/>
            </LinearGradientBrush>
        </Grid.Resources>

        <esri:Map x:Name="MyMap" Extent="-9275076.4794,5253225.9406,-9274273.6411,5253885.6155" >
            <esri:ArcGISTiledMapServiceLayer ID="StreetMapLayer" 
                Url="http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer" />
            <esri:GraphicsLayer ID="ParcelsGraphicsLayer" />
            <esri:GraphicsLayer ID="OffsetGraphicsLayer" />
        </esri:Map>

        <Grid HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,10,10,0" >
            <Rectangle Fill="{StaticResource PanelGradient}" Stroke="Gray"  RadiusX="10" RadiusY="10" Margin="0,0,0,5" >
                <Rectangle.Effect>
                    <DropShadowEffect/>
                </Rectangle.Effect>
            </Rectangle>
            <Rectangle Fill="#FFFFFFFF" Stroke="DarkGray" RadiusX="5" RadiusY="5" Margin="10,10,10,15" />
            <TextBlock x:Name="ResponseTextBlock" Text="Click on a parcel to generate an offset (cyan)." 
                       Width="200" TextAlignment="Left" Margin="30,20,20,30" TextWrapping="Wrap" Foreground="Black" />
        </Grid>

    </Grid>
</UserControl>
Sample code usage restrictions
5/16/2014