ActivateItem doesn't seem to work with WPF Frame

Topics: Bugs, Feature Requests
Jan 30, 2014 at 12:38 AM
Trying to send a ViewModel to a WPF Frame doesn't work. If I replace the frame with ContentControl works fine.

I found a link where someone talks about how to fix this, but it means a modification to View.cs and I'd rather not modify the framework; it would cause a number of issues when my project moves to a different group for future maintenance and they didn't realize the framework was modified.

Is there another work around or maybe a better way to do this?
Jan 30, 2014 at 4:11 PM
I changed my logic to the following to get this working the way a Navigation Frame would without using a Navigation Frame.

I removed the Frame and ContentPresenter and replaced them with DockPanel and ContentControl.

I then implemented a Conductor in my Main ViewModel to manage and own any open screens. The Main ViewModel/View is always active and acts like a frame with chrome elements.

I then subscribed to the EventAggregator in my Main ViewModel so any child ViewModel can call the Main ViewModel using a Message class and the Main ViewModel will handle the showing and closing of Views to the ContentControl using the Conductor.

I'm guessing this is similar to the way the BootStrapper works.

I'm new to Caliburn and MVVM so this a very different way of thinking. Hope this helps other avoid the Frame Navigation trap with MVVM.