0

I have a problem regarding WindowChrome. When I try to go full-screen it does not always go to the task bar. I do not know how it was going to the task bar in order to not be seen at the full-screen task bar.

xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:shell="http://schemas.microsoft.com/winfx/2006/xaml/presentation/shell"
    xmlns:System="clr-namespace:System;assembly=mscorlib"
    Title="MainWindow" Height="350" Width="525">
<Window.Resources>
    <System:Double x:Key="CaptionShellHeight">5</System:Double>
    <GridLength x:Key="CaptionRowHeight">5</GridLength>
</Window.Resources>
<Window.Style>
    <Style TargetType="{x:Type Window}">
        <Setter Property="shell:WindowChrome.WindowChrome">
            <Setter.Value>
                <shell:WindowChrome CaptionHeight="{StaticResource CaptionShellHeight}"
                                    CornerRadius="0"
                                    GlassFrameThickness="0,0,0,1"
                                    NonClientFrameEdges="None"
                                    ResizeBorderThickness="5"
                                    UseAeroCaptionButtons="true"/>
            </Setter.Value>
        </Setter>
    </Style>
</Window.Style>

  private void fullscreen(object sender, RoutedEventArgs e)
    {
        if (this.WindowState == WindowState.Maximized)
        {
            this.WindowStyle = System.Windows.WindowStyle.SingleBorderWindow;
            this.WindowState = WindowState.Normal;
        }
        else
        {
            this.WindowStyle = System.Windows.WindowStyle.None;
            this.WindowState = WindowState.Maximized;
        }
    }

Thanks a lot

maxshuty
  • 9,708
  • 13
  • 64
  • 77
MAX
  • 1
  • I apologize for my English I'm from the Netherlands. How to achieve when using fullscreen WindowChrome shell. – MAX Aug 17 '15 at 19:36
  • I want to achieve the same effect as Windows Media Player or Browser based Flash players which take up the ENTIRE (not even the taskbar is visible) real estate when maximised. – MAX Aug 17 '15 at 19:37
  • possible duplicate of [How do I make a WinForms app go Full Screen](http://stackoverflow.com/questions/505167/how-do-i-make-a-winforms-app-go-full-screen) – saarrrr Aug 17 '15 at 20:56

1 Answers1

1

Try doing:

WindowChrome.GlassFrameThickness = -1
Gaurav Mall
  • 2,372
  • 1
  • 17
  • 33
ping11700
  • 11
  • 1