William Troup
William Troup

Reputation: 13131

WPF Destructor

Does anyone know the correct method for writing a destructor for an XBAP application?

Upvotes: 0

Views: 1458

Answers (1)

Gishu
Gishu

Reputation: 136633

XBAP applications are managed WPF applications that run in a browser and hence shouldn't support deterministic cleanup.. aka destruction. The Dispose pattern is the answer for any cleanup that needs to be explicitly performed.

Or if just wanted to run some code just before shutdown... look at the Application class, which exposes life-time methods/events like OnExit/Exit.

Upvotes: 5

Related Questions