protected ApplicationBase(Guid uid, bool processOwner) : base(processOwner) { _uid = uid; _container = new Container(); _bootstrapper = new Bootstrapper(_container); DispatcherHolder.Initialize(new WindowsDispatcher()); }
private static void SetSystemParameters(bool useProfiling, bool useHardwareRendering) { // enable multi-core JIT. // see reference: http://msdn.microsoft.com/en-us/library/system.runtime.profileoptimization.aspx if (useProfiling) { ProfileOptimization.SetProfileRoot(App.ConfigurationDirectoryPath); ProfileOptimization.StartProfile(App.ProfileFileName); } // initialize dispatcher helper DispatcherHelper.UIDispatcher = Application.Current.Dispatcher; DispatcherHolder.Initialize(Application.Current.Dispatcher); // set rendering mode if (!useHardwareRendering) { System.Windows.Media.RenderOptions.ProcessRenderMode = System.Windows.Interop.RenderMode.SoftwareOnly; } }