Select to view content in your preferred language

Hide some symbols from TemplatePicker

1943
1
11-12-2010 11:46 AM
JamesMolohon
Emerging Contributor
I have a situation where we are using another tool to create polygons and saving them in a feature layer.  We would like to use the editor tool to change attributes of these features, but we don't want a user to add new features with the same category by using the template picker.  Is there a way to filter a symbol type from the template picker, but still be able to render these on the map and edit them?
Thanks,
James
0 Kudos
1 Reply
JenniferNery
Esri Regular Contributor
The TemplatePicker use symbols that each FeatureLayer Renderer defines, it does not take a subset of FeatureTypes from a given layer. It takes all or nothing from the layer. If you mean to hide templates from one layer in its entirety, you can edit the DefaultStyle of your EditorWidget and update the TemplatePicker LayerIDs property to exclude the layers which Add operation you already handle somewhere else.

Here's a blog post on how you can customize the style of any user control. http://blogs.esri.com/Dev/blogs/silverlightwpf/archive/2010/05/20/Use-control-templates-to-customize...

This is also a related thread, in case you wish the symbol displayed but the actual addition to your layer to be blocked. Two events useful here are the Editor's EditActivated and EditCompleted eventshttp://forums.arcgis.com/threads/9756-Undo-edits-of-the-EditorWidget
0 Kudos