예제 #1
0
 public MainWindow()
 {
     InitializeComponent();
     this.Title = ApplicationState.Version;
     ScreenController.Create(this);
     this.DataContext          = ScreenController.Instance;
     this.MouseLeftButtonDown += new MouseButtonEventHandler(MainWindow_MouseLeftButtonDown);
 }
예제 #2
0
        public MainWindow()
        {
            InitializeComponent();
            this.Title = ApplicationState.Version;
            ScreenController.Create(this);
            this.DataContext          = ScreenController.Instance;
            this.MouseLeftButtonDown += new MouseButtonEventHandler(MainWindow_MouseLeftButtonDown);

            Loaded += (o, e) =>
            {
                // Hook the window procedure
                var source = HwndSource.FromHwnd(new WindowInteropHelper(this).Handle);
                source.AddHook(new HwndSourceHook(WndProc));
            };

            initLayout();
        }