Exemplo n.º 1
0
        /// <summary>
        /// Configure a MainWindow in function of a Screen object
        /// </summary>
        /// <param name="screen"></param>
        void ConfigureScreen( Screen screen )
        {
            MainWindow w = new MainWindow();
            w.Closed += ( o, e ) =>
            {
                ((MainWindow)o).IsClosed = true;
            };

            w.Left = screen.WorkingArea.Left;
            w.Top = screen.WorkingArea.Top;

            w.Show();
            w.WindowState = WindowState.Maximized;
            w.KeyUp += EnterKeyUp;
            w.Closed += WindowClosed;

            _windows.Add( w );
        }
Exemplo n.º 2
0
 private void CreateFirstGrid( MainWindow w, WindowViewModel wdc, bool onlyOneMode = false )
 {
     Grid myGrid = w.MainWindowGrid;
     myGrid.Children.Add( wdc.Enter( onlyOneMode ) );
     wdc.GridOwned.ExitNode += ExitGridNode;
 }