I have C# and XAML code that I would like to use to add features to a feature layer that is in a file geodatabase. This is how the feature layer is defined in the XAML code:
<esriLocal:ArcGISLocalFeatureLayer ID="myLayerName" x:Name="myLayerName" Path="C:/Projects/MyMapPackage.mpk" LayerName="myLayerName" OutFields="*"
DisableClientCaching="True" Editable="True" Visible="True"
AutoSave="False" ValidateEdits="True" Opacity="0.50" />
This is how I am attempting to add the data to the feature layer in the C# code:
var aLayer = _map.Layers["myLayerName"] as ArcGISLocalFeatureLayer;
if (aLayer != null)
aLayer.Graphics.AddRange(myGraphicCollection);
aLayer.SaveEdits();
When I checked the unpacked location of the feature class, there are no features added, although the attributes and graphics are added to MyGraphicCollection, and show up there when I'm tracing through.
Am I doing something wrong in my code?
I am using ArcGIS Runtime.