Select to view content in your preferred language

Custom FeatureDataForm

605
1
12-16-2011 08:13 AM
BrianGustafson
Occasional Contributor
I built a form as a child window and cannot get the data from the form attached to the graphic that is saving.  What is the best way to go about creating a custom feature data form?
0 Kudos
1 Reply
JenniferNery
Esri Regular Contributor
If you want to customize just the look and feel of the FeatureDataForm: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#ToolkitFeatureDataForm, you can follow this blog post: http://blogs.esri.com/Dev/blogs/silverlightwpf/archive/2010/05/28/Localizing-ArcGIS-Controls.aspx. If you want to change the behavior of FeatureDataForm, you can download source from CodePlex: http://esrisilverlight.codeplex.com/

If you are using ChildWindow to display FeatureDataForm, you can use FeatureDataForm instance to get to the GraphicSource.

   ChildWindow window = new ChildWindow();
   FeatureDataForm form = new FeatureDataForm()
   {
    GraphicSource = graphic,
    FeatureLayer = featureLayer,
    IsReadOnly = !featureLayer.IsUpdateAllowed(graphic),
    MaxWidth = 500,
    MaxHeight = 500
   };
   window.Content = form;
   form.EditEnded += (s, e) => 
   {
    var graphic = form.GraphicSource;
    window.Close(); 
   };
            window.ShowDialog();
0 Kudos