protected override void OnStartup(StartupEventArgs e)
{
base.OnStartup(e);
// Ensure the current culture passed into bindings is the OS culture.
// By default, WPF uses en-US as the culture, regardless of the system settings.
FrameworkElement.LanguageProperty.OverrideMetadata(typeof(FrameworkElement), new FrameworkPropertyMetadata(XmlLanguage.GetLanguage(CultureInfo.CurrentCulture.IetfLanguageTag)));
DispatcherUnhandledException += OnDispatcherUnhandledException;
AppDomain.CurrentDomain.UnhandledException += OnCurrentDomainUnhandledException;
Current.Exit += OnApplicationExit;
this.compositionRoot = new CompositionRoot();
this.compositionRoot.Compose();
this.logger = this.compositionRoot.Logger;
this.logger.LogAlways(_ => "=========== Budget Analyser Starting ===========");
this.logger.LogAlways(_ => this.compositionRoot.ShellController.DashboardController.VersionString);
this.shellController = this.compositionRoot.ShellController;
this.shellController?.Initialize();
this.compositionRoot.ShellWindow.DataContext = this.compositionRoot.ShellController;
this.logger.LogInfo(_ => "Initialisation finished.");
this.compositionRoot.ShellWindow.Show();
}