1
2
3
4 #include "pch.h"
5
6 #include "App.xaml.h"
7 #include "MainWindow.xaml.h"
8
9 #include "toolkit.h"
10
11 using namespace winrt;
12 using namespace Windows::Foundation;
13 using namespace Microsoft::
UI::Xaml;
14 using namespace Microsoft::
UI::Xaml::Controls;
15 using namespace Microsoft::
UI::Xaml::Navigation;
16 using namespace winui;
17 using namespace winui::implementation;
18
19
20
21
22
23
24
25
26 App::App()
27 {
28 InitializeComponent();
29
30 #if defined
_DEBUG && !defined
DISABLE_XAML_GENERATED_BREAK_ON_UNHANDLED_EXCEPTION
31 UnhandledException([this](IInspectable
const&, UnhandledExceptionEventArgs
const& e)
32 {
33 if (IsDebuggerPresent())
34 {
35 auto errorMessage = e.Message();
36 __debugbreak();
37 }
38 });
39 #endif
40 }
41
42
43
44
45
46 void App::OnLaunched(LaunchActivatedEventArgs
const&)
47 {
48 ui_app_run_startup();
49
50
51 }
52