I took Toolkit Editor Widget SDK example code and added a new button to the Toolbar that opens and closes the Attachment Editor dialog/grid/collapsible window. http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#ToolkitAttachmentEditorhttp://help.arcgis.com/en/webapi/silverlight/samples/start.htm#ToolkitEditorWidgetBut I don't want to use the MouseLeftButtonUp="FeatureLayer_MouseLeftButtonUp" to select a feature and activate the attachment code ("add" button) <esri:FeatureLayer ID="IncidentsLayer"
Url="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/SanFrancisco/311Incidents/FeatureServer/0"
MouseLeftButtonUp="FeatureLayer_MouseLeftButtonUp"
AutoSave="False"
DisableClientCaching="True"
OutFields="*"
Mode="OnDemand" />
private void FeatureLayer_MouseLeftButtonUp(object sender, GraphicMouseButtonEventArgs e)
{
FeatureLayer featureLayer = sender as FeatureLayer;
for (int i = 0; i < featureLayer.SelectionCount; i++)
featureLayer.SelectedGraphics.ToList().UnSelect();
e.Graphic.Select();
MyAttachmentEditor.GraphicSource = e.Graphic;
}
I would like to have the attachment feature (the add button) become available when a feature is selected using the "New Selection" tool from the ToolkitEditorWidget. I know I might run into problems if multiple feature are selected but I figured I could always write something late to check that (hopefully lol). Is this even possible? I've been trying for some time now and have had little to no luck so I was wondering if someone could push me along.ThanksDave