Example #1
0
		protected override void OnStartup(StartupEventArgs e)
		{
			using (Stream stream = File.Open("VirtoCommerce.xml", FileMode.OpenOrCreate, FileAccess.Read, FileShare.Read))
			{
				ElementStateOperations.Load(stream);
			}
			Dispatcher.UnhandledException += OnDispatcherUnhandledException;
			AppDomain.CurrentDomain.UnhandledException += OnDomainUnhandledException;

			base.OnStartup(e);
			var bootstrapper = new Bootstrapper();
			bootstrapper.Run();
		}
        protected override void OnStartup(StartupEventArgs 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)));

            using (Stream stream = File.Open("VirtoCommerce.xml", FileMode.OpenOrCreate, FileAccess.Read, FileShare.Read))
            {
                ElementStateOperations.Load(stream);
            }
            Dispatcher.UnhandledException += OnDispatcherUnhandledException;
            AppDomain.CurrentDomain.UnhandledException += OnDomainUnhandledException;

            base.OnStartup(e);
            var bootstrapper = new Bootstrapper();
            bootstrapper.Run();
        }