Where can I put some code, that should be executed after the user closes the window by the close-icon (the X in the upper right corner)?
If I look at MainWindow.xaml in the visualisation window, the three icons in the upper right corner are shown as silhouettes, so it looks to me like the close-event can't be reached by MainWindow.xaml/MainWindow.xaml.cs in a standard way ...