
Hello,
I have done some work to make Actipro's docking framework work with the Caliburn.Micro MVVM framework. However, in order to do so, I had to create a derived DockSite class so I can override PrepareContainerForItemOverride. Specifically, I am doing a model first approach using the binding (ToolItemsSource) to create my ViewModels. I then do Caliburn.Micro View location, bind the View to the View.Model, and then attach the created View to the element.Content property.
I want to know if this is valid or will it break anything else? I was going to set the Content property in the DockSiteViewModelBehavior (provided in the sample), but the tool window is created and the Content property already set. Seems a bit wasteful to create a default ContentControl and then override it. Further, I am not sure what is going on under the covers to ensure I wont break something else.
It seems that for better support of the MVVM pattern, it would be helpful to provide some means of my plugging in ViewModel and View look up functions. The container would call to my code with contextual information, and I can look it up from there. The current binding works well for locating the view model as a property on the parent view model, but having to use the datatemplates to map to the view hard codes my view / viewmodel relationship.
David
I have done some work to make Actipro's docking framework work with the Caliburn.Micro MVVM framework. However, in order to do so, I had to create a derived DockSite class so I can override PrepareContainerForItemOverride. Specifically, I am doing a model first approach using the binding (ToolItemsSource) to create my ViewModels. I then do Caliburn.Micro View location, bind the View to the View.Model, and then attach the created View to the element.Content property.
I want to know if this is valid or will it break anything else? I was going to set the Content property in the DockSiteViewModelBehavior (provided in the sample), but the tool window is created and the Content property already set. Seems a bit wasteful to create a default ContentControl and then override it. Further, I am not sure what is going on under the covers to ensure I wont break something else.
It seems that for better support of the MVVM pattern, it would be helpful to provide some means of my plugging in ViewModel and View look up functions. The container would call to my code with contextual information, and I can look it up from there. The current binding works well for locating the view model as a property on the parent view model, but having to use the datatemplates to map to the view hard codes my view / viewmodel relationship.
David