using System.Runtime.InteropServices; using System.Windows; using Tetris.ViewsModels; namespace Tetris.Views; public partial class GameWindow : Window { public GameWindow() { AttachConsole(-1); InitializeComponent(); DataContext = new GameViewModel(); } [DllImport("kernel32.dll")] private static extern bool AttachConsole(int dwProcessId); }