-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathApp.xaml.cs
33 lines (30 loc) · 982 Bytes
/
App.xaml.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
using System;
using System.Diagnostics;
using System.Globalization;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Markup;
using BlitFlashNet.GitHubApi;
using BlitFlashNet.ViewModels;
namespace BlitFlashNet
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
private void App_OnStartup(object sender, StartupEventArgs e)
{
Application.Current.ShutdownMode = ShutdownMode.OnExplicitShutdown;
FrameworkElement.LanguageProperty.OverrideMetadata(
typeof(FrameworkElement),
new FrameworkPropertyMetadata(
XmlLanguage.GetLanguage(CultureInfo.CurrentCulture.IetfLanguageTag)));
var w = new MainWindow();
w.DataContext = new AppViewModel();
w.Show();
Application.Current.ShutdownMode = ShutdownMode.OnLastWindowClose;
}
}
}