forked from scriptcs/scriptcs-samples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart.csx
More file actions
35 lines (28 loc) · 638 Bytes
/
start.csx
File metadata and controls
35 lines (28 loc) · 638 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
32
33
34
35
#r "PresentationCore"
#r "PresentationFramework"
#r "WindowsBase"
#r "System.Xaml"
#r "System.Xml"
#load utilities.csx
#load mvvm.csx
#load viewmodels.csx
#load views.csx
using System.Windows;
using System.Threading;
using System.ComponentModel;
using System.Diagnostics;
using System.Windows.Input;
public class App : Application
{
protected override void OnStartup(StartupEventArgs e)
{
var viewModel = new CalculatorViewModel();
var window = new CalculatorView
{
DataContext = viewModel,
SizeToContent = SizeToContent.WidthAndHeight
};
window.Show();
}
}
Utilities.RunInSTAThread(() => new App().Run());