Reputation: 776
My application contains some objects that need to be cleaned up when the view closes, how do get caliburn to fire an event when it's closing the view? Is this even possible? Specifically it's some quartz.net triggers and schedules that need to be stopped once the application closes but I can't find anything to that end.
Upvotes: 0
Views: 2141
Reputation: 174309
First: Quartz.NET runs inside your process, so it will be stopped anyway when your process ends
Second: You can make your ViewModel implement IClose
and put your code inside TryClose
or derive from Screen
and override OnDeactivate
and put the code there.
Upvotes: 2