Editor Widget Online

This sample demonstrates being able to add, edit, move, delete, and save features in two FeatureLayers using the ESRI.ArcGIS.Client.Toolkit EditorWidget.

The two editable feature layers represent points of interest and fire evacuation areas. Use the symbol templates to add new features. Use the tools to modify or delete existing features. Save your edits when finished to commit any updates to the database.

Download Sample Application
XAML C# VB.NET
<UserControl x:Class="ArcGISWPFSDK.ToolkitEditorWidget"
      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"   
      xmlns:sys="clr-namespace:System;assembly=mscorlib">

    <Grid x:Name="LayoutRoot">
        <Grid.Resources>
            <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"/>
                <GradientStop Color="#FF3D7FAC" Offset="0.184"/>
                <GradientStop Color="#FF88C5EF" Offset="0.984"/>
            </LinearGradientBrush>
        </Grid.Resources>

        <esri:Map x:Name="MyMap" WrapAround="True">
            <esri:ArcGISTiledMapServiceLayer ID="BaseLayer" 
                                Url="http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer" />
            <esri:ArcGISDynamicMapServiceLayer ID="Fire Perimeter" 
                                               Url="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Fire/Sheep/MapServer" 
                                               VisibleLayers="2"/>
            <esri:FeatureLayer ID="Evacuation Perimeter" DisableClientCaching="True" 
                               AutoSave="False"
                               Url="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Fire/Sheep/FeatureServer/1" 
                               OutFields="*"                               
                               />
            <esri:FeatureLayer ID="Points of Interest" DisableClientCaching="True" 
                               AutoSave="False"
                               Url="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Fire/Sheep/FeatureServer/0"                               
                               OutFields="*" />
        </esri:Map>

        <StackPanel  x:Name="EditorToolStrip" Margin="0,5,5,0" >
            <Border Background="{StaticResource PanelGradient}" BorderThickness="1" CornerRadius="5"
                        HorizontalAlignment="Right"  VerticalAlignment="Top"
                        Padding="5" BorderBrush="Black">
                <Border.Effect>
                    <DropShadowEffect Color="Black" Direction="-45" BlurRadius="20" Opacity=".75" />
                </Border.Effect>
                <StackPanel Orientation="Vertical" HorizontalAlignment="Right" Margin="0,5,5,0"    VerticalAlignment="Top" >
                    <esri:EditorWidget x:Name="MyEditorWidget" Map="{Binding ElementName=MyMap}" 
                                      Width="300" 
                                      LayerIDs="Points of Interest,Evacuation Perimeter"
                                      AutoSelect="False"
                                      GeometryServiceUrl="http://tasks.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer"
                                      ShowAttributesOnAdd="True"  />
                </StackPanel>
            </Border>
        </StackPanel>

        <Grid HorizontalAlignment="Left" VerticalAlignment="Top" Margin="10,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="Two editable feature layers represent points of interest and fire evacuation areas.  Use the symbol templates to add new features.  Use the tools to modify or delete existing features. Save your edits when finished to commit any updates to the database." 
                       Width="200" TextAlignment="Left" Margin="30,20,20,30" TextWrapping="Wrap" Foreground="Black" />
        </Grid>

    </Grid>
</UserControl>

Sample code usage restrictions
5/16/2014