forked from LigasN/GameC
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainWindow.xaml.cs
More file actions
31 lines (27 loc) · 926 Bytes
/
MainWindow.xaml.cs
File metadata and controls
31 lines (27 loc) · 926 Bytes
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
using System.Windows;
namespace Game
{
/// <summary>
/// Main window - the application will start here
/// Nothing else should happen here, we outsource navigation duties to MenuPage
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}
// specify window behavior after initialization
// WPF will automatically detect this function
private void Window_Loaded(object sender, RoutedEventArgs e)
{
this.ParentFrame.Navigate(new Display.MenuPage(this)); // go to the menu page
}
protected override void OnClosing(System.ComponentModel.CancelEventArgs e)
{
Application.Current.Dispatcher.DisableProcessing();
Application.Current.Dispatcher.InvokeShutdown();
Application.Current.Shutdown();
}
}
}