views:

36

answers:

1

Is there any way to add some code to fire when an OOB silverlight app is uninstalled? I would like to fire something to my webservice when a user uninstalls the app, is this possible?

A: 

I have found out that you can handle the "InstallStateChanged" event on the App.xaml. With this you can check the InstallState and do something based on that.

Ben
That setting is not actually for determining when the app has been **un** installed.... think about it: how can your Silverlight code run (and fire something to a webservice) when it has been uninstalled?
slugster
Quote: [The InstallState will tell us if the current application has been *installed*.](http://chris.59north.com/post/Silverlight-4-COM-interope280a6I-cane28099t-believe-I-am-excitede280a6.aspx)
slugster
I should have said, whilst uninstalling then, not when uninstalled. But the above will work whilst uninstalling and return the Enum "NotInstalled", therefore enabling me to fire something to my webservice.
Ben