-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.xaml.cs
32 lines (25 loc) · 911 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
namespace BXMT
{
public partial class App : Application
{
public App()
{
InitializeComponent();
MainPage = new AppShell();
}
// Custom override to make default windows created have minimum size
protected override Window CreateWindow(IActivationState activationState)
{
var window = base.CreateWindow(activationState);
window.MinimumHeight = 600; // set minimal window height
window.MinimumWidth = 800; // set minimal window width
// Setting default window size to 1280x720
window.Height = 720;
window.Width = 1280;
DisplayInfo userDisplay = new DisplayInfo();
window.Y = (userDisplay.Height + window.Height) / 2.0;
window.X = (userDisplay.Width + window.Width) / 2.0;
return window;
}
}
}