-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.xaml.cs
57 lines (46 loc) · 1.73 KB
/
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
using BlankApp.Views;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
using System;
using Windows.ApplicationModel;
namespace BlankApp
{
/// <summary>
/// Provides application-specific behavior to supplement the default Application class.
/// </summary>
public partial class App : Application
{
public static Window MainWindow { get; set; } = new Window() { Title = "AppDisplayName" };
/// <summary>
/// Initializes the singleton application object. This is the first line of authored code
/// executed, and as such is the logical equivalent of main() or WinMain().
/// </summary>
public App()
{
InitializeComponent();
UnhandledException += App_UnhandledException;
Suspending += suspendingEventHandler;
}
private void suspendingEventHandler(object sender, SuspendingEventArgs e)
{
throw new NotImplementedException();
}
private void App_UnhandledException(object sender, Microsoft.UI.Xaml.UnhandledExceptionEventArgs e)
{
throw new NotImplementedException();
}
/// <summary>
/// Invoked when the application is launched normally by the end user. Other entry points
/// will be used such as when the application is launched to open a specific file.
/// </summary>
/// <param name="args">Details about the launch request and process.</param>
protected override async void OnLaunched(LaunchActivatedEventArgs args)
{
if (MainWindow.Content == null)
{
MainWindow.Content = new Counter() ;
}
MainWindow.Activate();
}
}
}