The problem is the border is too thick for Windows 10.
If you don't see the screenshot below, then here's the text:
- This border is too thick at left, right and bottom
- Border is also brighter at those edges
How to make a 1px border like Google Chrome (or Windows 10's Explorer) has? Negative 1px doesn't work nice, it makes the border white and it's still thick.
Framework is .NET Framework 4.6.2.
Code:
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:AnotherOffice"
xmlns:System="clr-namespace:System;assembly=mscorlib" x:Name="window" x:Class="AnotherOffice.MainWindow"
mc:Ignorable="d"
Title="AnotherOffice Text v0.0.1 - New document" Height="720" Width="1280" Background="{x:Null}" WindowState="Maximized" Margin="0" BorderThickness="8">
<Window.Style>
<Style TargetType="{x:Type Window}">
<Setter Property="WindowChrome.WindowChrome">
<Setter.Value>
<WindowChrome
GlassFrameThickness="8,40,8,8"
ResizeBorderThickness="2"
CornerRadius="0"
CaptionHeight="32"
UseAeroCaptionButtons="True"
/>
</Setter.Value>
</Setter>
</Style>
</Window.Style>
<local:AnotherOfficeTextBase Margin="0,32,0,0"/>
</Window>
UPD: Tried to use this code:
if (SystemParameters.IsGlassEnabled)
{
WindowChrome winChrome = new WindowChrome();
winChrome.CaptionHeight = 32;
winChrome.CornerRadius = new CornerRadius(0);
winChrome.GlassFrameThickness = new Thickness(8, 32, 8, 8);
winChrome.ResizeBorderThickness = new Thickness(1);
winChrome.UseAeroCaptionButtons = true;
WindowChrome.SetWindowChrome(this, winChrome);
InitializeComponent();
} else
{
MainWindowNoGlass fallback = new MainWindowNoGlass();
fallback.Show();
Close();
}
And... no effect.