Exemplo n.º 1
0
        private void setNormalWindow()
        {
            IFullScreen selectedVM = DataContext as IFullScreen;

            if ((selectedVM != null))
            {
                selectedVM.SetFullScreen(false);
            }
            else
            {
                return;
            }

            DataContext = mainViewModel;

            Topmost = false;

            WindowStyle = lastWindowStyle;
            ResizeMode  = lastResizeMode;

            WindowState = lastWindowState;

            Top    = lastTop;
            Left   = lastLeft;
            Height = lastHeight;
            Width  = lastWidth;

            isFullScreen = false;
        }
Exemplo n.º 2
0
        private void setFullScreen()
        {
            if (mainViewModel != null)
            {
                IFullScreen selectedVM = mainViewModel.GetActiveTab as IFullScreen;
                if (selectedVM != null)
                {
                    if (!this.Resources.Contains(new DataTemplateKey(selectedVM.GetType())))
                    {
                        return;
                    }

                    DataContext = selectedVM;
                    selectedVM.SetFullScreen(true);
                }
                else
                {
                    return;
                }
            }
            else
            {
                return;
            }

            storeWindowStatus();

            // Set values for FullScreen Mode
            WindowStyle = WindowStyle.None;
            ResizeMode  = ResizeMode.NoResize;

            Top    = 0;
            Left   = 0;
            Height = SystemParameters.PrimaryScreenHeight;
            Width  = SystemParameters.PrimaryScreenWidth;

            WindowState = WindowState.Normal;

            isFullScreen = true;
        }