wpf - Views external to modules not shown -
i working on wpf app loads modules dlls lazy screens transitioncontentcontrol. views viewmodels in module correctly shown when next standard naming conventions. however, have 2 problems:
1) module uses external "widgets", screens views loaded yet 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" called , in first instance no view found. called sec time , views detected can see widget viewmodels have view attached (onviewattached called) them (viewaware class), view has viewmodel datacontext. however, not shown @ end; recognise "onviewloaded" never called, instead view "could not find view...". problem?
i have used similar prototype app , added widgets project produces problem, navigator property called 1 time here. output same, though, no view found.
link
2) problem "cal:view.context" not seem work in modules, subfolders in view folder not seem resolved.
/patrick
cm looking matching view candidates using assemblysource
registry. default contains types of startup assembly.
as in case assemblies loosely coupled , loaded dynamically, likely, cm not find them.
try assemblysource.instance.add(yourassembly);
assembly has been loaded should prepare issue.
btw: why utilize convention based and explicit cm viewmodel binding in example?
wpf caliburn.micro
No comments:
Post a Comment