I've got this issue and it's causing me some grief. So I've reproduced it using the supplied examples.In EditToolsGeometry.xaml add the MouseRightButtonDown event to the map.<esri:Map x:Name="MyMap" Extent="-16574645.619,-5541958.774,13341035.686,10559275.713" Loaded="MyMap_Loaded"
esri:Editor.SnapDistance="30"
MouseClick="MyMap_MouseClick"
MouseMove="MyMap_MouseMove"
MouseLeftButtonUp="MyMap_MouseLeftButtonUp"
MouseRightButtonDown="MyMap_OnMouseRightButtonDown">
Then in the event handler add a Polyline per click. This bug only occurs when they're added in code behind.private void MyMap_OnMouseRightButtonDown(object sender, MouseButtonEventArgs e)
{
PointCollection pointCollection = new PointCollection { new MapPoint(0, 0), MyMap.ScreenToMap(e.GetPosition(MyMap)) };
Polyline polyline = new Polyline();
polyline.Paths.Add(pointCollection);
Graphic graphic = new Graphic
{
Symbol = LayoutRoot.Resources["MyScaleBox"] as ESRI.ArcGIS.Client.Symbols.Symbol,
Geometry = polyline
};
((GraphicsLayer)MyMap.Layers["MyGraphicsLayer"]).Graphics.Add(graphic);
((GraphicsLayer)MyMap.Layers["MyGraphicsLayer"]).Refresh();
}
Then move the a vertex around until you get the exception. This appears to be a race condition as the UpdateVertexPosition(MapPoint pnt, bool isTransformPoint) method checks DraggingVertex isn't null but by the time it gets to near the end of the method it is null.