In your other post regarding debugging, yes the number of steps to create a feature is too long, I am also working on a simpler method.It appears you are doing everything correct. I am using the Windows Tablet version of the out-of-the-box solution, I know your using the Mobile version.For the Mobile version (I looked at the sample code) it does make sense. But you want to remove the FeatureTypePage? If so. Your process may look something similar to what I am doing.1) Person clicks on tasks2) Person clicks on collect "Trees" <- this is key since you don't need the FeatureTypePage3) Program searches the cache for the "Tree" layers and then uses that for sketching4) This eliminate that FeatureTypePage, because the Tasks you set contains the name of the featurelayer you want to create a feature in.If you have 3 featurelayers you want your user to create feature in, then you will want 3 tasks (using the same code). Each of the tasks will have the name of the feature in the title or the routed command. "Collect Trees", "Collect Birds", "Collect Dogs". Once the user clicks on either of this, you can easily remove the word Collect from the string and just search the cache for the layer named "Trees" and then follow through with the sketchgeometry and attributes page.Here is the sample code for the first part, once again the name of the Layer in my case comes from a Button that the use presses, so you don't see that in this code snippet.private void CollectRadiationDataByMap(string featureTypeName)
{
try
{
Cursor.Current = Cursors.WaitCursor;
// Cache homepage for the application
// Once data collection is done, we come back to this cached page
_homePage = MobileApplication.Current.CurrentPage;
// Reset _feature and _featureType
_feature = null;
_featureType = FindFeatureTypeByName(featureTypeName);
if (_featureType == null)
{
ESRI.ArcGIS.Mobile.Client.Windows.MessageBox.ShowDialog("Can't find " + featureTypeName + ".", "Warning");
return;
}
// Create a new Feature, this will automatically call StartEditing on this feature
_feature = new Feature(_featureType, null);
// If this is the first time, create a SketchGeometryCollectionMethod,
// and listen to its Completed event. Once user accepts geometry, this event
// will be fired
if (_sketchGeometryCollectionMethod == null)
{
_sketchGeometryCollectionMethod = new SketchGeometryCollectionMethod();
_sketchGeometryCollectionMethod.Completed += new EventHandler<CompletedEventArgs>(_sketchGeometryCollectionMethod_Completed);
}
_sketchGeometryCollectionMethod.GeometryCollectionPage.Title = "Collect " + _featureType.Name;
_sketchGeometryCollectionMethod.GeometryCollectionPage.Note = "Create " + _featureType.Name + " by digitizing on the map";
_sketchGeometryCollectionMethod.StartGeometryCollection(_feature);
SaveTeamInfoClass.SaveTeamInfo(_feature);
}
finally
{
Cursor.Current = Cursors.Default;
}
}