First, I am very new to Caliburn.Micro.
I am trying to set up a framework for WPF based on the MediaOwl example.
The problem is that I have fairly complex CanClose routines on some of my ViewModels and when I want to shut down the application, dialogs were coming multiple times. I have reduced the complexity and can see that the CloseStrategy Execute
method is being called three times. I have no idea where to start looking for the problem.
The structure of the system is as follows. A shell with a containing a single Conductor<IDialog>.Collection.OneActive Viewmodel with "workspaces" (also a Conductor<IDialog>.Collection.OneActive ViewModel) containing
Even with absolutely no elements in the top Conductor<IDialog>.Collection.OneActive Viewmodel the CloseStrategy is being called three times. (The only active ViewModels are the ShellViewModel and the top level MainViewModel.) This
behavior (CloseStrategy called three times) remains the same no matter how many ViewModels I have open. I feel like Caliburn is trying to summon a Close ghost from a mirror.
Any ideas where to go hunting for the problem? Should I try caching some kind of “CloseLevel” in my ViewModels to work around the problem?