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

New Post: Viewlocator: Views not found outside external modules

$
0
0
I am working on a WPF app that loads its modules from dlls as lazy screens into a TransitionContentControl. Views for Viewmodels in the module are correctly shown when following the standard naming conventions. However, there are two problems:

1) The module itself uses external "widgets", Screens with views that are loaded from yet another dll.
[ImportMany(typeof(IWidget), AllowRecomposition = true)]
        public IEnumerable<ExportFactory<IWidget, IWidgetMetadata>> _widgets { get; set; }

<ContentControl x:Name="Navigator" cal:View.Model="{Binding Navigator}"/>
The property "Navigator" is called correctly and I have the impression that the views are detected as I can see that the widget viewmodels have a view attached (OnViewAttached called) to them (ViewAware class), but they are not shown at the end, instead the view "could not be found". Where is the problem?

2) Another problem is that "cal:View.Context" does not seem to work in the modules, so subfolders in the View folder do not seem to be resolved.

/Patrick

Viewing all articles
Browse latest Browse all 1760

Trending Articles



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