Editor Tracking Online

This sample demonstrates tracking the identity of users who make edits (adds, updates) to a feature class. IdentityManager is used to prompt the user to log in. IdentityManager sets the FeatureLayer.EditUserName which is used to tell the service who is editing the features. To use the sample enter one of the username and password below: username=user1, password=user1 or username=user2, password=user2. Use the tools to add new features, select features, and delete features. Update features using the FeatureDataGrid.

Download Sample Application
XAML C# VB.NET
<UserControl x:Class="ArcGISWPFSDK.EditorTracking"
     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:Editor x:Key="MyEditor"
                         GeometryServiceUrl="http://tasks.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer"
                         ContinuousMode="True" />
            </Grid.Resources>
            <Grid.RowDefinitions>
                <RowDefinition Height="*" />
                <RowDefinition Height="5" />
                <RowDefinition Height="150" />
            </Grid.RowDefinitions>
            <esri:Map Name="MyMap"
                  Extent="-13724204.479703,5317475.93669291,-13400488.4812798,5450378.64389627"
                  WrapAround="True">
                <esri:ArcGISTiledMapServiceLayer ID="Street Map"
                                             Url="http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer" />
                <esri:FeatureLayer ID="WildfireLayer"
                               DisplayName="Wildfire Layer"
                               Url="http://sampleserver6.arcgisonline.com/arcgis/rest/services/Wildfire_secure/FeatureServer/0"
                               MouseLeftButtonDown="FeatureLayer_MouseLeftButtonDown"
                               InitializationFailed="FeatureLayer_InitializationFailed"
                               OutFields="description,eventdate,eventtype,created_user,created_date,last_edited_user,last_edited_date"
                               Mode="OnDemand" />
            </esri:Map>
            <Grid Name="LoggedInGrid"
              HorizontalAlignment="Right"
              VerticalAlignment="Top"
              Margin="0,15,15,0"
              Visibility="Collapsed">
                <Rectangle Stroke="Gray"
                       RadiusX="10"
                       RadiusY="10"
                       Fill="LightGray"
                       Margin="-10">
                    <Rectangle.Effect>
                        <DropShadowEffect />
                    </Rectangle.Effect>
                </Rectangle>
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition />
                        <ColumnDefinition />
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition />
                        <RowDefinition />
                        <RowDefinition />
                    </Grid.RowDefinitions>
                    <TextBlock Grid.Row="0"
                           Grid.ColumnSpan="2"
                           Text="{Binding ElementName=MyMap,Path=Layers[WildfireLayer].DisplayName}" />
                    <TextBlock Text="Logged in as:"
                           Grid.Column="0"
                           Grid.Row="1"
                           Margin="2"
                           VerticalAlignment="Center" />
                    <TextBlock Name="LoggedInUserTextBlock"                              
                           FontWeight="Bold"
                           HorizontalAlignment="Left"
                           Margin="2"
                           Grid.Column="1"
                           Grid.Row="1"
                           TextAlignment="Left" />
                    <Button Name="ChangeUserButton"
                        Content="Sign Out"
                        Width="140"
                        Margin="0,5,0,5"
                        HorizontalAlignment="Center"
                        Grid.Row="2"
                        Grid.ColumnSpan="2"
                        Click="SignOut_Click" />
                </Grid>
            </Grid>
            <Border Name="ToolBorder"
                Background="LightGray"
                Visibility="Collapsed"
                BorderThickness="1"
                CornerRadius="5"
                HorizontalAlignment="Left"
                VerticalAlignment="Top"
                Padding="5"
                BorderBrush="Black"
                Margin="5">
                <Border.Effect>
                    <DropShadowEffect />
                </Border.Effect>
                <StackPanel Orientation="Vertical">
                    <esri:TemplatePicker Map="{Binding ElementName=MyMap, Mode=OneWay}"
                                     LayerIDs="WildfireLayer" />
                    <StackPanel DataContext="{StaticResource MyEditor}"
                            Orientation="Vertical">
                        <StackPanel Orientation="Horizontal">
                            <Button Command="{Binding ClearSelection}"
                                Margin="2">
                                <TextBlock>Clear<LineBreak />Selection</TextBlock>
                            </Button>
                            <Button Command="{Binding DeleteSelected}"
                                Margin="2">
                                <TextBlock>Delete<LineBreak />Selected</TextBlock>
                            </Button>
                        </StackPanel>
                    </StackPanel>
                </StackPanel>
            </Border>   
            <esri:FeatureDataGrid Grid.Row="2"
                              x:Name="MyDataGrid"
                              Map="{Binding ElementName=MyMap}"
                              SelectionMode="Single"
                              GraphicsLayer="{Binding ElementName=MyMap, Path=Layers.[WildfireLayer]}" />
        </Grid>
</UserControl>
Sample code usage restrictions
5/16/2014