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