I took the sample from here ...http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#EditToolsAutoSave... and modified it to use a GraphicsLayer instead of a FeatureLayer. I added buttons to enable the addition of points, lines, and polygons using a Draw object. I am able to add them, edit their vertices, and move them around no problem. But the only changes that persist are the ones to the points. Every time I move or edit the vertices of a line or polygon and then click the New Selection button the graphic reverts back to its original state prior to making edits.I noticed with the FeatureLayer there is an explicit Update method that can be called, but I don't see anything similar with a GraphicsLayer. How can I explicitly save edits to graphics on a graphics layer so they will persist across a given edit session?Here's my XAML ...
<UserControl x:Class="ESRIEditingTest.MainPage"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
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:esri="http://schemas.esri.com/arcgis/client/2009"
xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
xmlns:vsm="clr-namespace:System.Windows;assembly=System.Windows"
xmlns:ed="http://schemas.microsoft.com/expression/2010/drawing"
xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit"
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity">
<Grid x:Name="LayoutRoot">
<Grid.Resources>
<esri:Editor x:Key="MyEditor" EditCompleted="Editor_EditCompleted"
Map="{Binding ElementName=MyMap}"
LayerIDs="ThreatAreas"
GeometryServiceUrl="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer" />
</Grid.Resources>
<esri:Map x:Name="MyMap" Extent="-13054165,3850112,-13027133,3863559" esri:Editor.SnapDistance="20" esri:Editor.SnapKey="S">
<esri:ArcGISTiledMapServiceLayer ID="BaseLayer" Url="http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer" />
<esri:GraphicsLayer ID="ThreatAreas" />
<!--<esri:FeatureLayer ID="ThreatAreas"
Url="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/HomelandSecurity/operations/FeatureServer/2"
AutoSave="True"
Mode="OnDemand"
ValidateEdits="True"
DisableClientCaching="True" />-->
</esri:Map>
<Border Background="#FF919191" BorderThickness="1" CornerRadius="5"
HorizontalAlignment="Right" VerticalAlignment="Top"
Padding="5" BorderBrush="Black" Margin="0,5,5,0"
DataContext="{StaticResource MyEditor}">
<StackPanel x:Name="EditorTools"
Orientation="Vertical">
<StackPanel Orientation="Horizontal">
<Button x:Name="AddButton" Margin="2"
ToolTipService.ToolTip="Civil Disturbance"
Content="Add Polygon"
Command="{Binding Add}">
<Button.CommandParameter>
<sys:Int32>10101</sys:Int32>
</Button.CommandParameter>
</Button>
<Button x:Name="SelectButton" Margin="2"
Command="{Binding Select}"
CommandParameter="New" >
<TextBlock>New<LineBreak/>Selection</TextBlock>
</Button>
<Button x:Name="AddSelectButton" Margin="2"
Command="{Binding Select}"
CommandParameter="Add">
<TextBlock>Add to<LineBreak/>Selection</TextBlock>
</Button>
<Button x:Name="RemoveSelectButton" Margin="2"
Command="{Binding Select}"
CommandParameter="Remove" >
<TextBlock>Remove from<LineBreak/>Selection</TextBlock>
</Button>
<Button x:Name="ClearSelectionButton" Margin="2"
Command="{Binding ClearSelection}">
<TextBlock>Clear<LineBreak/>Selection</TextBlock>
</Button>
<Button x:Name="DeleteButton" Margin="2"
Command="{Binding DeleteSelected}">
<TextBlock>Delete<LineBreak/>Selected</TextBlock>
</Button>
<Button x:Name="CancelButton" Margin="2"
Command="{Binding CancelActive}">
<TextBlock>Cancel<LineBreak/>Action</TextBlock>
</Button>
<Button x:Name="AddPolyButton" Margin="2" Click="AddPolyButton_Click">
<TextBlock>Add<LineBreak/>Poly</TextBlock>
</Button>
<Button x:Name="AddPointButton" Margin="2" Click="AddPointButton_Click">
<TextBlock>Add<LineBreak/>Point</TextBlock>
</Button>
<Button x:Name="AddLineButton" Margin="2" Click="AddLineButton_Click">
<TextBlock>Add<LineBreak/>Line</TextBlock>
</Button>
</StackPanel>
<StackPanel Orientation="Horizontal">
<Button x:Name="EditVerticesButton" Margin="2"
Command="{Binding EditVertices}">
<TextBlock>Edit Vertices<LineBreak/>/Move Selected</TextBlock>
</Button>
<Button x:Name="CutButton" Margin="2"
Command="{Binding Cut}">
<TextBlock>Cut<LineBreak/>Selected</TextBlock>
</Button>
<Button x:Name="ReshapeButton" Margin="2"
Command="{Binding Reshape}">
<TextBlock>Reshape<LineBreak/>Selected</TextBlock>
</Button>
<Button x:Name="UnionButton" Margin="2"
Command="{Binding Union}">
<TextBlock>Union<LineBreak/>Selected</TextBlock>
</Button>
<Button x:Name="SaveButton" Margin="2"
Command="{Binding Save}">
<TextBlock>Save</TextBlock>
</Button>
</StackPanel>
<StackPanel Orientation="Horizontal">
<CheckBox x:Name="FreehandCheckBox" VerticalAlignment="Center" Margin="2"
IsChecked="{Binding Path=Freehand, Mode=TwoWay}"
Content="Freehand Draw" />
<CheckBox x:Name="AutoCompleteCheckBox" VerticalAlignment="Center" Margin="2"
IsChecked="{Binding Path=AutoComplete, Mode=TwoWay}"
Content="Auto Complete" />
<CheckBox x:Name="AutoSelectCheckBox" VerticalAlignment="Center" Margin="2"
IsChecked="{Binding Path=AutoSelect, Mode=TwoWay}"
Content="Auto Select" />
<CheckBox x:Name="ContinuousCheckBox" VerticalAlignment="Center" Margin="2"
IsChecked="{Binding Path=ContinuousMode, Mode=TwoWay}"
Content="Continuous Action" />
</StackPanel>
</StackPanel>
</Border>
</Grid>
</UserControl>