Question

I've built a small Out-Of-Browser Silverlight 4 application on which I have an exit button. Clicking on this button is supposed to deliver the same behaviour as clicking close (X button) on the upper right corner - close (exit) application. But I can't figure out how this is done... I've already tried suggestions like Application.Current.MainWindow.Close() calling from my button's Click event, but it won't work-nothing happens. Note: Maybe important - executing that line ( Application.Current.MainWindow.Close() ) from In-Browser mode generates the following exception> "Out-of-browser specific settings do not affect in-browser applications." but I suppose that's normal.

Was it helpful?

Solution

I have just ran into solution to this 'issue': In order to use Application.Current.MainWindow.Close() to exit your OOB app, it is necessary to enforce ElevatedPermissions within your application's Out-Of-Browser settings. Hope this will save lots of someone's time...

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top