コード例 #1
0
ファイル: VideoView.cs プロジェクト: midnite8177/Flyleaf
        public bool NormalScreen()
        {
            if (oldParent == null || WindowBack == null)
            {
                return(false);
            }

            WindowBack.Content = null;
            WindowBack.Content = oldContent;

            if (oldParent is StackPanel)
            {
                ((StackPanel)oldParent).Children.Add(this);
            }
            else if (oldParent is Grid)
            {
                ((Grid)oldParent).Children.Add(this);
            }
            else
            {
                return(false);
            }

            WindowBack.ResizeMode  = ResizeMode.CanResize;
            WindowBack.WindowStyle = WindowStyle.SingleBorderWindow;
            WindowBack.WindowState = WindowState.Normal;

            IsFullScreen = false;
            WindowFront.Activate();

            return(true);
        }
コード例 #2
0
ファイル: VideoView.cs プロジェクト: midnite8177/Flyleaf
        public bool FullScreen()
        {
            if (WindowBack == null)
            {
                return(false);
            }

            oldParent = Parent;

            if (Parent is StackPanel)
            {
                ((StackPanel)Parent).Children.Remove(this);
            }
            else if (Parent is Grid)
            {
                ((Grid)Parent).Children.Remove(this);
            }
            else
            {
                return(false);
            }

            oldContent         = WindowBack.Content;
            WindowBack.Content = this;

            WindowBack.ResizeMode  = ResizeMode.NoResize;
            WindowBack.WindowStyle = WindowStyle.None;
            WindowBack.WindowState = WindowState.Maximized;

            IsFullScreen = true;
            WindowFront.Activate();

            return(true);
        }