-
Notifications
You must be signed in to change notification settings - Fork 430
Expand file tree
/
Copy pathApp.xaml.cpp
More file actions
42 lines (35 loc) · 1.15 KB
/
App.xaml.cpp
File metadata and controls
42 lines (35 loc) · 1.15 KB
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
// Copyright (c) Microsoft Corporation and Contributors. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.
#include "pch.h"
#include "App.xaml.h"
#include "MainWindow.xaml.h"
#include <winrt/Microsoft.UI.Windowing.h>
#include <winrt/Windows.Graphics.h>
using namespace winrt;
using namespace Microsoft::UI::Xaml;
namespace winrt::StoragePickersTestApp::implementation
{
App::App()
{
#if defined _DEBUG && !defined DISABLE_XAML_GENERATED_BREAK_ON_UNHANDLED_EXCEPTION
UnhandledException([](IInspectable const&, UnhandledExceptionEventArgs const& e)
{
if (IsDebuggerPresent())
{
auto errorMessage = e.Message();
__debugbreak();
}
});
#endif
}
void App::OnLaunched([[maybe_unused]] LaunchActivatedEventArgs const& e)
{
window = make<MainWindow>();
window.as<MainWindow>()->InitializeDefaults();
if (auto appWindow = window.AppWindow())
{
appWindow.Resize(winrt::Windows::Graphics::SizeInt32{ 1800, 1220 });
}
window.Activate();
}
}