While Rob Eisenberg is writing The Window Manager I might as well share my findings about it.
There are 3 Show_XYZ methods:
- ShowDialog() - shows a modal window
- ShowWindow() - shows a modeless window
- ShowPopup() - shows a popup
public void ShowModal()
{
var wm = new WindowManager();
var vm = new ModalViewModel();
wm.ShowDialog(vm);
}
public void ShowWindow()
{
var wm = new WindowManager();
var vm = new WindowViewModel();
wm.ShowWindow(vm);
}
I found ShowPopup() a bit less intuitive to use. Your view must be a UserControl and not a Popup as you might expect.
public void ShowPopup()
{
var wm = new WindowManager();
var vm = new PopupViewModel();
var settings = new Dictionary
settings.Add("StaysOpen", false);
wm.ShowPopup(vm, null, settings);
}
That's it. happy coding!
UPDATE - You can find a detailed artcle on WindowManager at Caliburn Micro Part 5: The Window Manager.