I have a Windows WPF app in which I'm using Caliburn.Micro. The main window view/viewmodel is handled by Caliburn.Micro. One of it's buttons pops up a new dialog window which uses a different view-viewmodel.
In this dialog I have a container (list box and some filter controls) that I want to make into a reusable control so that I can include it in other dialogs. To do this I extracted from the dialog's view and viewmodel the relevant code and created a new view and viewmodel. This all looks good.
The problem is that now back in the dialog I have a dockpanel with a big empty space where I need the reusable control to go.
From the dialog viewmodel OnInitalize() I could create the reusable control viewmodel, but I don't know how to get it's view into the dialog view's dockpanel.
To create the dialog from the main window viewmodel I use WindowManager().ShowDialog() to display the viewmodel for the dialog and Caliburn.Micro takes care of setting up the view. Is there a way I can specify in the dialog's XAML that I want to embed the view for the reusable control and have Caliburn create the appropriate view/viewmodel?
Or am I going about it the wrong way?