<esri:EditorWidget x:Name="MyEditorWidget" Map="{Binding ElementName=MyMap}" Width="300" AutoSelect="False" GeometryServiceUrl="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer" ShowAttributesOnAdd="True" Loaded="EditorWidget_Loaded"/>
private void MyEditorWidget_EditCompleted(object sender, Editor.EditEventArgs e) { if (e.Action == Editor.EditAction.Add) { foreach (Editor.Change change in e.Edits) { if (change.Layer != null && change.Layer is FeatureLayer && change.Graphic != null) { FeatureLayer featureLayer = change.Layer as FeatureLayer; ShowAttributeForm(featureLayer, change.Graphic); break; } } } } private void ShowAttributeForm(FeatureLayer featureLayer, Graphic graphic) { ChildWindow window = new ChildWindow(); FeatureDataForm form = new FeatureDataForm() { GraphicSource = graphic, FeatureLayer = featureLayer, IsReadOnly = featureLayer.IsReadOnly }; window.Content = form; form.EditEnded += (s, e) => { window.Close(); }; window.Show(); }
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.