Quantcast
Channel: Caliburn.Micro: Xaml Made Easy
Viewing all articles
Browse latest Browse all 1760

New Post: ActivateItem doesn't seem to work with WPF Frame

$
0
0
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.

Viewing all articles
Browse latest Browse all 1760

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>