views:

252

answers:

1

do we have Window.Closing Event in Silverlight version 3? If not, is there an easy way to check if the user is closing the browser and to stop him doing so unless he explicitly stops a running timer?

Regards, Nadeem.

A: 

There is no window closing event in Silverlight directly.

However using the Html bridge you may be able to handle the onbeforeunload event fired by some browsers (IE, Firefox and Safari perhaps more). Even in these cases you only get the option of informing the user about the reason why you don't want them to close and if they agree then they can click the cancel button provided.

AnthonyWJones