so have searched around couldn't find matched needed. have wpf application , using caliburn micro , autofac.
my app.xaml is
<application x:class="drogo.meera.ui.wpf.launcher.app" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:launcher="clr-namespace:drogo.meera.ui.wpf.launcher"> <application.resources> <resourcedictionary> <resourcedictionary.mergeddictionaries> <resourcedictionary> <launcher:appbootstrapper x:key="appbootstrapper"/> </resourcedictionary> </resourcedictionary.mergeddictionaries> </resourcedictionary> </application.resources> </application> and appbootstrapper is
public class appbootstrapper : bootstrapperbase { private readonly ilog _log = logmanager.getlogger(methodbase.getcurrentmethod().declaringtype); private icontainer _container; public appbootstrapper() { this._log.debug("appbootstrapper ctor..."); this.initialize(); } protected override void onstartup(object sender, startupeventargs e) { this._log.debug("appbootstrapper.onstartup"); } protected override void configure() { this._log.debug("enter:appbootstrapper.configure"); try { var builder = new containerbuilder(); builder.register<iwindowmanager>(c => new windowmanager()).instanceperlifetimescope(); builder.register<ieventaggregator>(c => new eventaggregator()).instanceperlifetimescope(); // register other dependencies on builder this._container = builder.build(); } catch (exception ex) { this._log.error(ex.tostring()); } this._log.debug("exit:appbootstrapper.configure"); } protected override object getinstance(type service, string key) { ... } protected override ienumerable<object> getallinstances(type service) { ... } protected override void buildup(object instance) { this._container.injectproperties(instance); } } ok, application runs fine (i haven't defined main window yet, that's still work in progress). anticipating have number of autofac modules referenced assemblies loading dependencies during configure method above , expect take few seconds (possibly 4-5 seconds or longer).
what load splash screen application starts (i interested in singleton splashscreen can updated progress) , before (preferably) appbootstrapper executes.
i have seen examples of using image build type set splashscreen that's not want. want window based splash screen textblock can updated each of autofac modules progress while application starting up. have tried creating splash screen in onstartup method late happens after configure.
i new wpf , newer caliburn micro have understanding of autofac , great if can suggest best way achieve this.
Comments
Post a Comment