public MainWindow() { InitializeComponent(); this.Title = "2048"; this.Width = 300; this.Height = 400; this.Background = new SolidColorBrush(Colors.Beige); this.ResizeMode = ResizeMode.NoResize | ResizeMode.CanMinimize; this.WindowStartupLocation = WindowStartupLocation.CenterScreen; oGame = new Game(); this.AddChild(oGame.GetGamePanel()); this.KeyDown += OnKeyDownHandler; this.Focus(); }