Select to view content in your preferred language

Close any Add-in dialogs when Explorer applicatoin is closed

2696
3
05-16-2011 08:05 AM
RobWaller
Occasional Contributor
I have a working DockWindow Add-in for ArcGIS Explorer. This Add-in shows a form that the user interacts with and selects options. When the Explorer application is shut down and then restarted, the form is still open and appears if the user had it open in their previous map. In other words if the user has the Add-in showing, and doesn't close the dialog themselves before shutting down the application, it will show by default the next time they launch Explorer. This appears to be the default behavior with Add-ins.
Is there a way to force the form to close when the application or map document is closed? I don't want the form ever to show when the map first loads.

Thanks
0 Kudos
3 Replies
AndreiIvanov
Deactivated User
Rob,

I did not try it myself, but in your code you could try listening to DocumentClosed event:

http://help.arcgis.com/en/arcgisexplorer/1500/sdk/componenthelp/index.html#//0003000009z0000000

and force dockwindow to close in it.

Let me know if it works or not, and I can think of something else.
0 Kudos
RobWaller
Occasional Contributor
I saw that documentation on DocumentClosed event but could not figure out where that would be placed in the Add-in template code to listen to the event, are there any samples using this event along with Add-ins? Also, how would the reference be made to the Add-in's form container, it seems the handling of the creation/display of the form is handled in the Base classes for the various Add-in types. Any examples appreciated! Thanks
0 Kudos
AndreiIvanov
Deactivated User
I tried that, no luck. I believe on user end there is no such control for dock window.
0 Kudos